PHP Sessions preventing Varnish to cache
-
I checked with Dreamhost and they said there’s PHP Sessions that are setting cookies and affecting Varnish. They said if there is a rule that I’d like to add, they can add it. Can you create a rule for this error below in order to have this fixed?
Checking into the site after adding the configuration, it looks like
there’s still PHP sessions that are setting cookies and affecting
Varnish. I’ll provide another example of the cURL output to help.
< Cache-Control: max-age=86400, s-maxage=21600, max-age=0, public
Cache-Control: max-age=86400, s-maxage=21600, max-age=0, public
< Set-Cookie: wfvt_1576562421=599244fbf03c8; expires=Tue, 15-Aug-2017
01:18:59 GMT; Max-Age=1800; path=/; HttpOnly
Set-Cookie: wfvt_1576562421=599244fbf03c8; expires=Tue, 15-Aug-2017
01:18:59 GMT; Max-Age=1800; path=/; HttpOnly
< Set-Cookie: gaia_woocommerce_items_count=0; path=/
Set-Cookie: gaia_woocommerce_items_count=0; path=/
< Set-Cookie: gaia_woocommerce_cart_total=0; path=/
Set-Cookie: gaia_woocommerce_cart_total=0; path=/
< Location: https://www.watchingpixels.com/
Location: https://www.watchingpixels.com/The code they created for Woocommerce is below:
sub vcl_recv { if (req.url ~ "^/(cart|my-account|checkout|addons)" || req.url ~ "add-to-cart=" ) { return (pass); } }
The page I need help with: [log in to see the link]
- The topic ‘PHP Sessions preventing Varnish to cache’ is closed to new replies.