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
FEATURE: Make cache lifetime of routing caches configurable #2904
Comments
To clarify: How is this different from
from Cahces.yaml and setting that on
|
What is a use case for this and what is the difference between |
The difference to the defaultLifetime is that this is configured for a specific route and not the whole cache. |
As discussed in other places, I'm a little skeptical of this approach since it mainly targets the symptoms. To recap: Root cause for the cache flooding is:
I think we could contain the issue by:
|
The weirdest case i know of is a callback url that had to encode values in the path (by route) because some external service appended external data always with a question mark and did not respect existing query parameters. Clearly buggy but nothing i could change. Offcourse this is extreme but whenever external identifiers somehow are handled in a path it may make sense to control the caching time for a route separately from the global defaultLifetime. Ideally one could also define special cache-tags for such routes. I totally agree that this is not the general solution for routing cache overflow but more a tool to handle edge cases. |
Is there an existing issue for this?
Description
The routing caches currently have no lifetime and thus all entries live forever unless someone configures a default lifetime.
This is generally fine but some routes may still require different lifetimes than others. It would be great to configure the lifetime for the routing and resolve cache for each route individually.
Possible Solution
Add the options
routeCacheLifetime
andresolveCacheLifetime
to the routing configurationThis is a based on the issue #1426 but uses a different approach
The text was updated successfully, but these errors were encountered: