Cache broken after enabling geolocation with page cache in WooCommerce

[ad_1]

Pss: when we enable the debug log for page cache, we see that the cache key is empty. When we disable Geolocate with page caching, the cache key is back.

Hello @tomowow

Thank you for reaching out and I am happy to assist you with this.

By default, any queries added to the URL preven that page from being cached. If you check the source and the debug on the live website you can see the following line:

Page Caching using redis (Requested URI contains query)

Requested URI contains query means that the URI contains a query and therefore will not be cached. If you do want to cache URIs with query strings, you can enable the option Cache URIs with query string variables in Peformance>Page Cache – General section.

This will ensure that the query strings are cached.

As for the 304 response, this header also needs to be enabled in Performance>Bowser Cache under the XML&HTML section.

I hope this helps!

Thanks!

Thanks a million Marko, that seemed to be the issue. I missed that one!

Hello @tomowow

You are most welcome!

We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
Thanks!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer