Redis Cache
Redis is an open source, in-memory data structure store. It is particularly well suited as a distributed cache. Redakt CMS offers Redis cache integration through an optional NuGet package.
Installation
Install the Redis package with the NuGet package manager or the Package Manager Console.
PM> Install-Package Redakt.Data.Redis
Register Redis services in the ConfigureServices
method in your project's Startup.cs
file.
public void ConfigureServices(IServiceCollection services)
{
// ... framework and other services here
services.AddRedakt(this.Configuration, builder =>
{
builder.AddRedisCache();
// ... other Redakt services
});
}
Configuration
The Redis cache is configured through the appsettings.json
file. Any configuration that is not included in the appsettings.json
file will be set to its following default values.
{
"Redakt": {
"ApplicationCache": {
"Redis": {
"ConnectionString": ""
}
}
}
}
Connection String
Required. Sets the connection string to the Redis instance.