Sliding Expiry with ICacheClient

Hi mythz,
I am working with ICacheClient and wanted to implement a sliding expiry for my cache.
I read few docs on Caching Providers
also checked the overloads for the method CacheAsync.SetAsync and couldn’t find an option to add Sliding Expiry like we normally do.

Could you guide me a bit around this?

If you just want to extend the lifetime when accessed, you would just call Set with a new Expiry Date after you get it.

Okay thanks for the help👍

1 Like