I am currently using Memory Cache Client with no issues.
I would like to switch to Redis Cache, but I cannot get it to work.
I’m able to access my Redis instance thru:
x open redis (once opened I change port to match my instance).
I already setup IoC per documentation:
container.Register<IRedisClientsManager>(new RedisManagerPool("localhost:6363")); container.Register(c => c.Resolve<IRedisClientsManager>().GetCacheClient());
This is how I read from Cache for GetPaged method:
var cacheContainer = CacheDisabled ? null : Cache.Get<Dictionary<string, CommonResponse>>(CACHE_CONTAINER_GET_PAGED()); if (cacheContainer == null) cacheContainer = new Dictionary<string, CommonResponse>();
And this is how I try to write to Cache:
if (!CacheDisabled) Cache.Replace(CACHE_CONTAINER_GET_PAGED(), cacheContainer);
I am not getting any exception and don't know what's wrong as it is working fine with memory cache.