No specific error message, but caching does not work as expected when query strings are present.
What is the issue you’re encountering
I am experiencing an issue where requests to my website with query strings are not being cached by Cloudflare, even though the configuration should allow it. Specifically: When making a request to https://triumph.co.il/product-category/bras/, caching works fine. When adding a query string like https://triumph.co.il/product-category/bras/?var=1, Cloudflare responds with CF-Cache-Status: BYPASS. I have verified that the origin server is not sending any restrictive headers like Cache-Control: no-cache or private. Additionally, the caching level is set to “Standard,” which should cache requests with query strings. I need assistance understanding why this happens and how to resolve it so that requests with the same query string are cached properly.
I didn’t have a specific cache rule, and it was still cached by Cloudflare as long as there was no query string in the request. However, once a query string was added, caching stopped working.
To address this, I created a global cache rule to cache the entire site, and now it works even with query strings.
Is this the right approach, or is there a better way to handle this scenario?
Thank you so much for the detailed and accurate response!
I truly appreciate your insight, but I’d love it if you could elaborate further on why you think this approach might break the site.
At the moment, it seems like the only viable solution to make the site cache pages with query strings. If there are alternative approaches that you recommend, I’d be happy to hear them as well!