ABP Framework Caching System extends the ASP.NET Core distributed cache. So, any provider supported by the standard ASP.NET Core distributed cache can be usable in your application and can be configured just like documented by Microsoft.
However, ABP provides an integration package for Redis Cache: Volo.Abp.Caching.StackExchangeRedis. There are two reasons for using this package, instead of the standard Microsoft.Extensions.Caching.StackExchangeRedis package.
- It implements
GetManyAsyncmethods. These are not standard methods of the Microsoft Caching library, but added by the ABP Framework Caching system. They significiantly increases the performance when you need to set/get multiple cache items with a single method call.
- It simplifies the Redis cache configuration (will be explained below).
Volo.Abp.Caching.StackExchangeRedis is already uses the Microsoft.Extensions.Caching.StackExchangeRedis package, but extends and improves it.
This package is already installed in the application startup template if it is using Redis.
Open a command line in the folder of your
.csproj file and type the following ABP CLI command:
abp add-package Volo.Abp.Caching.StackExchangeRedis
Volo.Abp.Caching.StackExchangeRedis package automatically gets the redis configuration from the
IConfiguration. So, for example, you can set your configuration inside the
Thank you for your valuable feedback!
Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.