我正在构建一个基于StackExchangeRedisCacheClient的项目,并且已经过时了:'StackExchangeRedisCacheClient' 已过时:'此接口将在下一个专业中删除。请改用 RedisCacheClient。
所以我试图从 StackExchangeRedisCacheClient 移动到RedisCacheClient不幸 的是没有文档或一些有用的信息可以做到这一点。
如何创建缓存客户端?与RedisCacheClient?需要的参数是'RedisCacheClient(IRedisCacheConnectionPoolManager,ISerializer,RedisConfiguration)'
我查看了以下链接并尝试实现单个池但没有成功https://github.com/imperugo/StackExchange.Redis.Extensions/issues/176# 在提供连接字符串后无法创建缓存客户端。
StackExchangeRedisCacheClient:(工作正常)
public CacheManager()
{
string connectionString = "localhost:300....."
var serializer = new NewtonsoftSerializer();
cacheClient = new StackExchangeRedisCacheClient(serializer, connectionString);
clientName = cacheClient.Database.Multiplexer.ClientName;
}
RedisCacheClient:
public CacheManager()
{
string connectionString = "localhost:300....."
var serializer = new NewtonsoftSerializer();
cacheClient = new RedisCacheClient( *** ??? *** );
clientName = cacheClient.Database.Multiplexer.ClientName;
}