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: 

  1. In WooCommerce → Settings → General → General Options, make sure you have selected: Geolocate with page caching support”
    Default Customer Location: Geolocate (with page caching support)
  2. In the Advanced options of WP Rocket, find this box: Cache query strings”
  3. In this box enter:  v
    Settings box labelled Cache query strings

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