CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
I've configured my cache as below, but am not getting the OnRemoveByHandle called.
Configuration = new ConfigurationBuilder() .WithJsonSerializer() .WithRedisConfiguration("redis", c => { var connectionString = cp.DataOptions.Cache.Split(":"); c .WithAllowAdmin() .EnableKeyspaceEvents() .WithEndpoint(connectionString[0], int.Parse(connectionString[1])); }) .WithRedisBackplane("redis") .WithRedisCacheHandle("redis", true).Build();
Cache is being created like so:
_cache = CacheFactory.FromConfiguration<T>(Configuration); _cache.OnRemoveByHandle += OnExpiry;
I see the item being added and expired from the cache in RedisDesktopManager.
Hi,
I've configured my cache as below, but am not getting the OnRemoveByHandle called.
Configuration = new ConfigurationBuilder() .WithJsonSerializer() .WithRedisConfiguration("redis", c => { var connectionString = cp.DataOptions.Cache.Split(":"); c .WithAllowAdmin() .EnableKeyspaceEvents() .WithEndpoint(connectionString[0], int.Parse(connectionString[1])); }) .WithRedisBackplane("redis") .WithRedisCacheHandle("redis", true).Build();
Cache is being created like so:
_cache = CacheFactory.FromConfiguration<T>(Configuration); _cache.OnRemoveByHandle += OnExpiry;
I see the item being added and expired from the cache in RedisDesktopManager.Any idea what I could be doing wrong?