Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to manually handle cache expiration? #69

Open
xiaohucode opened this issue Jan 22, 2024 · 5 comments
Open

How to manually handle cache expiration? #69

xiaohucode opened this issue Jan 22, 2024 · 5 comments

Comments

@xiaohucode
Copy link

use [CacheMode::IgnoreRules] How to manually handle cache expiration

@06chaynes
Copy link
Owner

Each CacheManager implementation has a delete method you can use to manually delete a cache record by key. You could also potentially add cache bust logic to return a list of cache keys to remove under specified conditions.

@xiaohucode
Copy link
Author

Each CacheManager implementation has a delete method you can use to manually delete a cache record by key. You could also potentially add cache bust logic to return a list of cache keys to remove under specified conditions.

Is it possible to add a maximum expiration time? It is used to control response expiration.

@06chaynes
Copy link
Owner

I would think it should be possible to add such logic in your application

@xiaohucode
Copy link
Author

I would think it should be possible to add such logic in your application

I added a max_ Stale Is this feasible?

https://github.com/xiaohucode/http-cache/commit/f346d0304b9a2f5eb2942d75cc6a5e3cf479e368

@06chaynes
Copy link
Owner

i think so but I would want to make a few changes first, if you'd like to open a PR we can work through that there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants