RCommon.RedisCache 2.4.1

dotnet add package RCommon.RedisCache --version 2.4.1
                    
NuGet\Install-Package RCommon.RedisCache -Version 2.4.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RCommon.RedisCache" Version="2.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RCommon.RedisCache" Version="2.4.1" />
                    
Directory.Packages.props
<PackageReference Include="RCommon.RedisCache" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RCommon.RedisCache --version 2.4.1
                    
#r "nuget: RCommon.RedisCache, 2.4.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RCommon.RedisCache@2.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RCommon.RedisCache&version=2.4.1
                    
Install as a Cake Addin
#tool nuget:?package=RCommon.RedisCache&version=2.4.1
                    
Install as a Cake Tool

RCommon.RedisCache

Provides a Redis-backed distributed cache implementation of ICacheService using IDistributedCache from StackExchange.Redis, with fluent builder extensions for DI configuration.

Features

  • RedisCacheService -- implements ICacheService using IDistributedCache backed by StackExchange.Redis
  • Automatic JSON serialization/deserialization of cached values via IJsonSerializer
  • RedisCachingBuilder for plugging into the AddRCommon() builder pipeline via WithDistributedCaching<T>
  • Configure() extension to customize RedisCacheOptions (connection string, instance name, etc.)
  • CacheDynamicallyCompiledExpressions() extension to enable expression caching for improved runtime performance

Installation

dotnet add package RCommon.RedisCache

Usage

using RCommon;
using RCommon.RedisCache;

services.AddRCommon(builder =>
{
    builder.WithDistributedCaching<RedisCachingBuilder>(cache =>
    {
        cache.Configure(options =>
        {
            options.Configuration = "localhost:6379";
            options.InstanceName = "MyApp:";
        });
        cache.CacheDynamicallyCompiledExpressions();
    });
});

Key Types

Type Description
RedisCacheService ICacheService implementation backed by Redis via IDistributedCache with JSON serialization
RedisCachingBuilder Concrete builder for configuring Redis distributed caching
IRedisCachingBuilder Builder interface extending IDistributedCachingBuilder

Documentation

For full documentation, visit rcommon.com.

License

Licensed under the Apache License, Version 2.0.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RCommon.RedisCache:

Package Downloads
RCommon.Persistence.Caching.RedisCache

A cohesive set of infrastructure libraries for dotnet that utilizes abstractions for event handling, persistence, unit of work, mediator, distributed messaging, event bus, CQRS, email, and more

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.4.1 92 2/18/2026
2.3.2-alpha.0.3 32 2/18/2026
2.3.2-alpha.0.2 31 2/18/2026
2.3.2-alpha.0.1 45 2/9/2026
2.3.1 107 2/5/2026
2.3.0 108 2/3/2026
2.2.2-alpha.0.1 381 12/11/2025
2.2.1-alpha.0.2 129 10/24/2025
2.2.1-alpha.0.1 133 10/24/2025
2.1.11-alpha.0.2 126 10/24/2025
2.1.11-alpha.0.1 93 7/18/2025
2.1.10 209 7/17/2025
2.1.9-alpha.0.1 144 7/17/2025
2.1.2.4 210 5/21/2025
2.1.2.3 219 5/1/2025
2.1.2.2 172 1/23/2025
2.1.2.1 165 1/17/2025
2.1.2 150 1/17/2025
2.1.1.4 164 1/7/2025
0.0.0-alpha.0 141 7/17/2025
Loading failed