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

General expiry on the default database SQL cache #4455

Closed
enyciaa opened this issue Oct 14, 2022 · 2 comments
Closed

General expiry on the default database SQL cache #4455

enyciaa opened this issue Oct 14, 2022 · 2 comments

Comments

@enyciaa
Copy link
Contributor

enyciaa commented Oct 14, 2022

Use case

The MemoryCache has a field expireAfterMillis. This feature would also be useful for the sql cache.

Describe the solution you'd like

An expireAfterMillis field when creating the SqlNormalizedCacheFactory.

If there's no plans to add this to the library, it'd also be great to hear, or indeed if there is an api for this that I've missed!

@martinbonnin
Copy link
Contributor

Hi 👋 Indeed, that's a current limitation of the SQL cache. We do have plans to improve that situation albeit it's a complicated problem. You can read some of it in this issue. There are also incubating artifacts with TTL/expiration APIs to support this albeit I wouldn't use them in production at the moment because I'm not sure how performant they are. If you end up trying them, please let us know what you think of the APIs as we're in a place where we can still change them and feedback is very welcome.

@enyciaa
Copy link
Contributor Author

enyciaa commented Oct 17, 2022

Awesome that it's in the pipeline! Will close this issue with reference to that one #2331

@enyciaa enyciaa closed this as completed Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants