Pages Aren’t Cached When WooCommerce Geolocation Enabled
⛔️ Deprecated: This document only applies to WP Rocket prior to 2.8.6.
As of WP Rocket version 2.8.6, we automatically cache the WooCommerce geolocation query string.
When you enable the WooCommerce Geolocation feature, it appends a query string like the following to all URLs:
By default WP Rocket does not cache pages with query strings–in this case, “v” is the query string.
So basically all pages with those urls are not being cached and are therefore slow.
To make it work:
- In WooCommerce → Settings → General → General Options, make sure you have selected: “Geolocate with page caching support”
- In the Advanced options of WP Rocket, find this box: “Cache query strings”
- In this box enter:
After you have done this, you will then see the usual indicators that caching is working, as described here:
How To Check If WP Rocket Is Caching Your Pages