Invalidate/Expire data manually #138
-
Hi, I have to manually invalidate the cache and now I'm using the Remove method. Since I'm using the FailSafe approach, I'd rather just invalidate/expire the data than remove it (this way the data will be loaded on the first request and if there is an error the old data will be returned). I've searched the documentation (and code) but haven't found anything like this. I think the method I need is something similar to the MemoryCacheAccessor.EvictEntry method, but I'm not sure. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
HI @th3nu11 and thanks for using FusionCache! A method to expire a cache entry without removing it was on my radar for some time: as you correctly pointed out it does already exist in the Maybe now is the time to do it. Let me think a little bit about it and will come back to you with news soon. |
Beta Was this translation helpful? Give feedback.
-
Hi @th3nu11 , v0.22.0 has been released and |
Beta Was this translation helpful? Give feedback.
Hi @th3nu11 , v0.22.0 has been released and
Expire()
/ExpireAsync()
is now officially supported 🎉