Thread Starter
naratt
(@naratt)
My questions:
1. I don’t have any recently viewed widget. Can i let the plugin ignore this cookie and serve the data from cloudflare cache ?
2. When logoff, my home page is still bypass. But how the x-cache is HIT ? Can I include this page in caching ?
3. When logon, with wordpress + woocommerce, is it possible to have cache HIT ?
-
This reply was modified 4 years, 2 months ago by
naratt.
Plugin Contributor
iSaumya
(@isaumya)
Home page : https://www.zoomcamera.net/
Product Page : https://www.zoomcamera.net/shop/digital-camera/dji-action-2-camera/
– As I can see both of these pages are being cached by Cloudflare:
View post on imgur.com
View post on imgur.com
I am not seeing any bypass or the wired behaviour that you are reporting. When you have cookies then it will bypass the cache and the x-wp-cf-super-cache-cookies-bypass is only present when a page is bypassed from cache and not for any other situations.
This seems really wired and I am unable to reproduce it in any way.
Thread Starter
naratt
(@naratt)
I just test cache and it’s working properly now.
View post on imgur.com
I tested this several times before submitting the ticket.
The problem is when user login. On both home and product page, cache will be bypass because of woocommerce cookie.
So, can you confirm that no other way to have cache HIT when login ?
Plugin Contributor
iSaumya
(@isaumya)
So, can you confirm that no other way to have cache HIT when login ?
– When you login the cache is supposed to be bypassed as when you are logged in it is very important to ensure that the requests are served via the origin server and not the CF cache as you might have many PHP logics inside the site for logged in users. Like showing their name or other things.
Thread Starter
naratt
(@naratt)
Do you exclude the cookie wp_woocommerce_session_ from caching ?
If so, can i set the plugin to ignore this cookie and let the cache serve ?
I’m using worker mode.
PS: I found from this article that Kinsta doesn’t exclude this cookie and it’s safe to do so.
https://kinsta.com/blog/wordpress-cookies-php-sessions/
Plugin Contributor
iSaumya
(@isaumya)
These are the default bypass cookies:
'wordpress_logged_in_',
'comment_',
'woocommerce_',
'wordpressuser_',
'wordpresspass_',
'wordpress_sec_',
'yith_wcwl_products',
'edd_items_in_cart',
'it_exchange_session_',
'comment_author',
'dshack_level',
'auth',
'noaffiliate_',
'mp_session',
'mp_globalcart_'
Any cookies starts will will be bypassed by default. Moreover Cloudflare won’t serve cache pages if the page has cookie in it anyways.
If so, can i set the plugin to ignore this cookie and let the cache serve ?
– You can’t tell the plugin to ignore a cookie. But if you have any other cookies for which you also wanna bypass cache by that is not present in this list, that you can add when using worker mode. As I said CF doesn’t serve cached contents when the page response has cookies anyways. Moreover in fact it is the best practice not to serve cache on the main HTML page request when cookies are present as those cookie values can be used inside PHP code to dynamically show data, e.g. recently viewed items or items in cart.