LiteX.Cache.Redis 2.0.0

Provide Redis Cache service for any type of application (Asp.Net Core, .Net Standard 2.x). Small library for manage cache with Redis. A quick setup for Redis.

There is a newer version of this package available.
See the version list below for details.
Install-Package LiteX.Cache.Redis -Version 2.0.0
dotnet add package LiteX.Cache.Redis --version 2.0.0
<PackageReference Include="LiteX.Cache.Redis" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LiteX.Cache.Redis --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

LiteXCache

Provide Cache service for any type of application (Asp.Net Core, .Net Standard 2.x). Having a default implementation to wrap the MemoryCache.

Add a dependency

nuget

Run the nuget command for installing the client as Install-Package LiteX.Cache.Redis

Usage

Configuration

AppSettings

{
  "RedisConfig": {
    "RedisCachingConnectionString": "127.0.0.1:6379,ssl=False",
    "PersistDataProtectionKeysToRedis": false
  }
}

Startup Configuration

public class Startup
{
    public IConfiguration configuration { get; }

    public Startup(IConfiguration configuration)
    {
        this.configuration = configuration;
    }

    public void ConfigureServices(IServiceCollection services)
    {
        // register per request cache service
        services.AddScoped<ICacheManager, PerRequestCacheManager>();

        // static cache manager (use one of below)
        #region Redis Cache Configuration

        // add redis configuration settings
        services.AddSingleton(configuration.GetSection("RedisConfig").Get<RedisConfig>());

        // register redis configuration service
        services.AddSingleton<IRedisConnectionWrapper, RedisConnectionWrapper>();

        // register static cache service (redis)
        services.AddSingleton<IStaticCacheManager, RedisCacheManager>();

        #endregion
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {

    }
}

LiteXCache

Provide Cache service for any type of application (Asp.Net Core, .Net Standard 2.x). Having a default implementation to wrap the MemoryCache.

Add a dependency

nuget

Run the nuget command for installing the client as Install-Package LiteX.Cache.Redis

Usage

Configuration

AppSettings

{
  "RedisConfig": {
    "RedisCachingConnectionString": "127.0.0.1:6379,ssl=False",
    "PersistDataProtectionKeysToRedis": false
  }
}

Startup Configuration

public class Startup
{
    public IConfiguration configuration { get; }

    public Startup(IConfiguration configuration)
    {
        this.configuration = configuration;
    }

    public void ConfigureServices(IServiceCollection services)
    {
        // register per request cache service
        services.AddScoped<ICacheManager, PerRequestCacheManager>();

        // static cache manager (use one of below)
        #region Redis Cache Configuration

        // add redis configuration settings
        services.AddSingleton(configuration.GetSection("RedisConfig").Get<RedisConfig>());

        // register redis configuration service
        services.AddSingleton<IRedisConnectionWrapper, RedisConnectionWrapper>();

        // register static cache service (redis)
        services.AddSingleton<IStaticCacheManager, RedisCacheManager>();

        #endregion
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {

    }
}

Release Notes

Small library for manage cache with Redis. A quick setup for Redis.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
7.0.3 1,030 1/31/2019
7.0.2 1,253 8/25/2018
7.0.1 146 8/9/2018
7.0.0 208 6/30/2018
6.2.0 232 6/23/2018
6.1.0 260 6/18/2018
6.0.0 266 6/2/2018
5.0.0 230 5/7/2018
4.0.0 324 5/4/2018
3.0.0 281 4/25/2018
2.0.0 256 4/22/2018
1.0.0 318 4/20/2018
Show less