!!! IMPORTANT !!! This class is only intended to be used as a singleton because we construct the
multiplexer in our constructor, and constructing multiplexers is expensive.
We have to use an instance created via DI instead of a static class because we need to be able
inject Configuration to have access to the connection string.
public class RedisAdminCache : Sagara.Core.Caching.RedisCacheInheritance System.Object 🡒 RedisCache 🡒 RedisAdminCache
NOTE: Be sure to set abortConnect=false in the connection string so that we gracefully handle connection failures.
!!! IMPORTANT !!! This class is only intended to be used as a singleton because we construct the
multiplexer in our constructor, and constructing multiplexers is expensive.
We have to use an instance created via DI instead of a static class because we need to be able
inject Configuration to have access to the connection string.
public RedisAdminCache(Microsoft.Extensions.Logging.ILogger<Sagara.Core.Caching.RedisAdminCache> logger, string connectionString);logger Microsoft.Extensions.Logging.ILogger<RedisAdminCache>
connectionString System.String
Same as RedisCache, but it supports protected operations, such as FLUSH.
NOTE: Be sure to set abortConnect=false in the connection string so that we gracefully handle connection failures.
Delete all the keys of all databases on the server.
public System.Threading.Tasks.Task FlushAllAsync();