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

Actively gc cache entries with ttl on supported storage backends #2378

Open
pi0 opened this issue Apr 18, 2024 · 0 comments
Open

Actively gc cache entries with ttl on supported storage backends #2378

pi0 opened this issue Apr 18, 2024 · 0 comments
Labels

Comments

@pi0
Copy link
Member

pi0 commented Apr 18, 2024

Context: Followup from a discussion with @Atinux as he asked if it is possible to pass custom transaction options to defineCachedHandlerto allow setItem with custom ttl and allow invalidating caches. currently, some unstorage drivers support ttl inconsistently.


Currently, the caching layer, passively (on demand) invalidates cache entries on the next access. But it does not delete them during revalidation or in the background.

Actively (automatically by storage backend) invalidating caches, is pending for universal ttl support, which afterward, we can set it.

We might also find a strategy for passive invalidation (during revalidation if it fails for example) but not sure. Another option is for unstorage to support background gc.

@pi0 pi0 added enhancement New feature or request pending discussion labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant