Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Implemented events for the following handles
In 0.9.3 and previous versions,
But one key feature is missing: Trigger OnRemove if a key expires or gets evicted by the underlying cache.
For in-memory caches, this is pretty simple because this is usually a build in functionality and already used by CacheManager.
For distributed caches this gets a little bit more tricky.
I decided to separate the existing
There will be a new
For the in-memory caches, the implementation was pretty straight forward. Basically, we can listen on callbacks provided by the cache and pass those through.
For Redis, things get more complicated:
If not configured in Redis, CacheManager will not receive any events.
I'm trying to test if the configuration is present, but the run
Key and Region value limitations
The key stored in Redis holding the CacheItem is build by using
Integration with UpdateMode.UP
If UpdateMode is set to
Testing this is pretty hard, I will probably not be able to 100% validate that all the caches trigger evicts correctly, as that depends on memory pressure.