CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
I am using CacheManager for 2 layers of caching to increase speed across my applications.
I'm using InMemory cache along with Redis as a back plane.
I'm working with invalidating the local in-memory cache data. I have subscribed to the item update and remove event on redis cache but my application does not receive any events. When I run the command it shows that it has already subscribed to the channel which can be seen from the result of the command given below.
Is there anything wrong with this code or do I require some additional configuration for this to make it work?
what I want to achieve:
I have Redis cache and multiple services are using this for invalidating their data using the events of this Redis cache. Each service have its own local in-memory cache related to the data in the main Redis cache. when the data is modified in the Redis cache each local cache will receive an event of data updated or removed from Redis cache and hence they will remove their local copy too to avoid serving stale data.
I am using CacheManager for 2 layers of caching to increase speed across my applications. I'm using InMemory cache along with Redis as a back plane.
I'm working with invalidating the local in-memory cache data. I have subscribed to the item update and remove event on redis cache but my application does not receive any events. When I run the command it shows that it has already subscribed to the channel which can be seen from the result of the command given below.
The event registration code can be seen below:
This is cache registration.
Is there anything wrong with this code or do I require some additional configuration for this to make it work?
what I want to achieve:
I have Redis cache and multiple services are using this for invalidating their data using the events of this Redis cache. Each service have its own local in-memory cache related to the data in the main Redis cache. when the data is modified in the Redis cache each local cache will receive an event of data updated or removed from Redis cache and hence they will remove their local copy too to avoid serving stale data.