-
Notifications
You must be signed in to change notification settings - Fork 25
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
Varnish Cache Refresh Triggering HTML Requests Instead of JSON (HTTP 406) #146
Comments
@qguillou-niji If you are using varnish you should also enable tag based caches. Sulu purges the URL + a Tag referencing the page - this tag is written on all URL which did use that page for rendering. Sulu have tag based caching enabled by default also for the php based http cache. For varnish you need also enable it I think it is this documentation: https://docs.sulu.io/en/2.6/cookbook/caching-with-varnish.html#using-xkey /cc @wachterjohannes |
Thank you for your response @alexander-schranz .
|
@qguillou-niji best is you share your whole |
The Varnish VCL configuration is based on the documentation at https://docs.sulu.io/en/2.6/cookbook/caching-with-varnish.html#varnish-configuration but with specificities as it manages multiple domains, unfortunately in its current state I cannot send it. To return to the problem I am encountering, it does not concern the invalidation which works well but the refresh which follows the invalidation. |
I'm using this bundle on my Sulu project, which has a Varnish cache configured.
When a page is modified, the cache invalidation is performed automatically, but I also see a cache refresh being performed on the current page and its child pages via GET requests on the page URLs.
These GET calls are made without the ".json" suffix at the end of the URL, so Sulu tries to respond with the HTML format, which is not supported by my Sulu project. This results in an HTTP 406 error response, which in turn leads to error logs.
Nothing impactful, everything seems to work correctly, but I'm wondering if there's a configuration that could address this error? (Prevent cache refresh, make the call in JSON format, or other options).
Thank you in advance for your feedback.
The text was updated successfully, but these errors were encountered: