Skip to content

Add query_params to static_caching.exclude #1307

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

Open
indykoning opened this issue Feb 3, 2025 · 0 comments
Open

Add query_params to static_caching.exclude #1307

indykoning opened this issue Feb 3, 2025 · 0 comments

Comments

@indykoning
Copy link

indykoning commented Feb 3, 2025

Currently you can only exclude items from cache using a custom class, Urls or url regexes.
However these regexes are run on the url with the url parameters stripped.

This means if query params are enabled pages like /search?q=test or /page?nocache will be cached.
This could create a large amount of caches for pages used once.

I propose adding query_params to static_caching.exclude, if the url contains one of these query params. caching will be disabled entirely, just like the urls works.

(as a default we could add live-preview)

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

1 participant