You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there any plans to implement a sliding expiration for HybridCacheEntryOptions?
The existing DistributedCacheEntryOptions has a SlidingExpiration property which has been working well for my team and I. We have another mechanism to invalidate cache keys when updates to the underlying data occurs so we like to keep the data in Redis for as long as it is being used and eventually expire when that particular data is not regularly accessed.
Desired Solution
Ideally, the same SlidingExpiration property would be added to HybridCacheEntryOptions and the value would be passed along in ToDistributedCacheEntryOptions and handled in the downstream IDistributedCache calls.
Background and motivation
This is a duplicate of dotnet/aspnetcore#56754 which I believe is in the wrong repo.
Are there any plans to implement a sliding expiration for
HybridCacheEntryOptions
?The existing
DistributedCacheEntryOptions
has aSlidingExpiration
property which has been working well for my team and I. We have another mechanism to invalidate cache keys when updates to the underlying data occurs so we like to keep the data in Redis for as long as it is being used and eventually expire when that particular data is not regularly accessed.Desired Solution
Ideally, the same
SlidingExpiration
property would be added toHybridCacheEntryOptions
and the value would be passed along inToDistributedCacheEntryOptions
and handled in the downstreamIDistributedCache
calls.API Proposal
API Usage
Risks
At first glance the risk involved here is implementing this in a manner that does not negate the performance benefits provided by using
HybridCache
.For instance if a cache request hits the local
MemoryCache
it's expiration would get updated but the entry in theIDistributedCache
would not.The text was updated successfully, but these errors were encountered: