dotnetcore / EasyCaching

:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
MIT License
1.95k stars 322 forks source link

Using SlidingExpiration, AbsoluteExpiration and AbsoluteExpirationRelativeToNow in Set Redis and InMemory #420

Open mehdihadeli opened 1 year ago

mehdihadeli commented 1 year ago

Hi, How can I use SlidingExpiration, AbsoluteExpiration, AbsoluteExpirationRelativeToNow in Set method of redis and in-memory cache? There is this option in their bultin providers

catcherwong commented 1 year ago

@mehdihadeli Thanks for your interest in this project.

We don't support SlidingExpiration at this time.

All the providers use AbsoluteExpirationRelativeToNow in Set method.

mehdihadeli commented 1 year ago

@catcherwong Can I add them as new overloads for Set method? I know both redis and in-memory cache have this feature in their native libraries.

catcherwong commented 1 year ago

Welcome to submit a PR.

mehdihadeli commented 1 year ago

Sure, I will do it