Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class RedisCacheService

    Represents a caching service that uses Redis as the cache provider.

    Inheritance
    object
    AwsBaseService
    RedisCacheService
    Implements
    ICacheService
    IDisposable
    Inherited Members
    AwsBaseService.Configuration
    AwsBaseService.ExponentialBackoffInSeconds
    AwsBaseService.Logger
    AwsBaseService.Dispose()
    AwsBaseService.GetServiceRegionEndPoint()
    AwsBaseService.CreateService<T>()
    AwsBaseService.CreateDefaultRetryAsyncPolicy()
    AwsBaseService.CreateDefaultRetryPolicy()
    AwsBaseService.CreateRetryAsyncPolicy<T>()
    AwsBaseService.CreateRetryAsyncPolicy<T, T1>()
    AwsBaseService.CreateRetryAsyncPolicy<T, T1, T2>()
    AwsBaseService.CreateRetryAsyncPolicy<T, T1, T2, T3>()
    AwsBaseService.CreateRetryAsyncPolicy<T, T1, T2, T3, T4>()
    AwsBaseService.CreateCircuitBreaker<T, T1>()
    AwsBaseService.Dispose(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Cloud.AWS.Caching
    Assembly: Innovt.Cloud.AWS.Caching.dll
    Syntax
    public class RedisCacheService : AwsBaseService, ICacheService, IDisposable

    Constructors

    | Edit this page View Source

    RedisCacheService(ILogger, IAwsConfiguration, RedisProviderConfiguration)

    Initializes a new instance of the RedisCacheService class.

    Declaration
    public RedisCacheService(ILogger logger, IAwsConfiguration configuration, RedisProviderConfiguration providerConfiguration)
    Parameters
    Type Name Description
    ILogger logger

    The logger instance for logging.

    IAwsConfiguration configuration

    The AWS configuration.

    RedisProviderConfiguration providerConfiguration

    The configuration for the Redis cache provider.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when providerConfiguration is null.

    Fields

    | Edit this page View Source

    RedisProviderActivitySource

    Declaration
    protected static readonly ActivitySource RedisProviderActivitySource
    Field Value
    Type Description
    ActivitySource

    Methods

    | Edit this page View Source

    DisposeServices()

    Disposes of resources used by the RedisCacheService.

    Declaration
    protected override void DisposeServices()
    Overrides
    AwsBaseService.DisposeServices()
    | Edit this page View Source

    GetValue<T>(string)

    Gets a cached value of type T associated with the specified key.

    Declaration
    public T GetValue<T>(string key)
    Parameters
    Type Name Description
    string key

    The key associated with the cached value.

    Returns
    Type Description
    T

    The cached value if found; otherwise, the default value for T.

    Type Parameters
    Name Description
    T

    The type of the cached value.

    | Edit this page View Source

    Remove(string)

    Removes a cached value associated with the specified key.

    Declaration
    public void Remove(string key)
    Parameters
    Type Name Description
    string key

    The key associated with the cached value to remove.

    | Edit this page View Source

    SetValue<T>(string, T, TimeSpan)

    Sets a cached value of type T associated with the specified key.

    Declaration
    public void SetValue<T>(string key, T entity, TimeSpan expiration)
    Parameters
    Type Name Description
    string key

    The key to associate with the cached value.

    T entity

    The value to cache.

    TimeSpan expiration

    The expiration time for the cached value.

    Type Parameters
    Name Description
    T

    The type of the value to cache.

    Implements

    ICacheService
    IDisposable

    Extension Methods

    Extensions.IsNull(object)
    Extensions.ToStringOrDefault(object)
    SimpleMapper.MapTo<T1>(object)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX