You will get bypass when our system knows not to cache this request – logged in users, set-cookie headers, the exclude is used or the URL itself is one of the known ones that should not be cached – cart, checkout, etc. Since purging browser cache results in HIT it must be that you’re logged into that site.
Dear @hristo-sg
thank you for your response.
All that follows is without any user logged in
I noticed the following:
Cache BYPASS is being triggered when cookie
wp_woocommerce_session_………………. is stored
Step by step :
1. go to shop page (see https://www.rarenoiserecords.com/releases) => x-cache HIT
2. add product to cart (ajax) => Cookies : woocommerce_items_in_cart,
woocommerce_cart_hash,
wp_woocommerce_session_……………….
are stored
3. refresh page => x-cache BYPASS
3. remove item from cart (ajax) => Cookies : woocommerce_items_in_cart woocommerce_cart_hash are removed, wp_woocommerce_session_………………. is still stored
4. refresh page => x-cache BYPASS
5. manually remove cookie wp_woocommerce_session_……………….
6. refresh page => x-cache HIT
I am confused, as I thought you did not BYPASS when wp_woocommerce_session_…. was stored (see https://ww.wp.xz.cn/support/topic/woocommerce-setup-2/ but maybe that was a long time ago)
How can I change this behaviour? I am getting bypasses when I should not it seems.
Thank you in advance for your assistance
Giacomo
-
This reply was modified 5 years, 2 months ago by
gbruzzo.
Update: We ran the same on a test site with minimal plugins (WP, WC, SG Optimizer and very few others) with Storefront.
See https://www.densesignals.com/releases
the same occurs: when the woocommerce session cookie is present, the cache will be bypassed. This is very problematic.
A customer visiting the site, adding a good to cart, then removing it, then visiting the site again will be served the site without caching, as if he/she was logged in (which is not the case).
Please advise
Giacomo Bruzzo
Marking as resolved, discussed in another thread.
Hey Stoyan @stoyangeorgiev
When a question/problem is closed and marked as “discussed in another thread” subsequent visitors are left scratching their head and no where to look for the answer. Please consider adding a link to the thread where the question/problem is being discussed further.
Cheers,
Julian