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

Force cache of specific query strings seem not to work #223

Open
uprise10 opened this issue Nov 6, 2024 · 0 comments
Open

Force cache of specific query strings seem not to work #223

uprise10 opened this issue Nov 6, 2024 · 0 comments

Comments

@uprise10
Copy link

uprise10 commented Nov 6, 2024

Describe the bug
When you have a URL as url.com?test=a, this is cached as path /path/to/cache/url.com/test/index-https.html

This also means that url.com/test/ will be delivered from the same cache file.

However: since this query parameter determines specific content, we don't want to have the same page cached as 1 result.

In the nginx config are options to ignore specific query parameters, which should suggest that if you don't do so, the page with query parameters is being cached separately. However, this doesn't seem to be so?

Is this intentional? Or do we need to add something specific in the nginx config yet?

PS: the debug headers shows a specific file with query parameters, but the actual result is that this file is not on the server.

Versions
What version of Nginx are you using ?
What version of Rocket-Nginx are you using ? 3.1.0
What version of WP Rocket are you using ? 3.15.3
Are you using Nginx as a reverse proxy (with Apache for instance) ? No

To Reproduce
Steps to reproduce the behaviour:

  1. Go to url.com?test=a
  2. Check contents in cache directory
  3. Go to url.com
  4. See that content in cache directory is not changed and serves the same file, generated from step 1

Did you activate the debug in Rocket-Nginx ? Please do and include any headers.
Yes. The debug headers shows a specific file with query parameters, but the actual result is that this file is not on the server.

Make sure you include ALL Nginx configuration files you are using. Remove any sensitive information before submitting.

Oour nginx config: https://gist.github.com/uprise10/434b784bee44fef45e01fb464fc231c3

Expected behavior
We would expect that both URLs, with and without query parameters, have different cached content, unless it's in the "ignored query parameters list"

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