Customizing Page Cache Exclusions

By default, any POST request bypasses the page cache. Certain URL paths and cookies also bypass the page cache. If a cookie is present for a logged in WordPress user or a shopping cart for WooCommerce or Easy Digital Downloads for example, the page cache will be skipped. Any URL containing a query string parameter that is not an ignored parameter will also bypass the page cache.

To customize the page cache configuration, navigate to the Page Cache tab under a site. This screen may take a few moments to load as it fetches the exact configuration currently sitting on your server. This ensures that we don’t overwrite any customizations you may have made by SSH’ing into the server.

Page Cache screen

Path Exclusions

To customize the path exclusions, you can add the paths you want to exclude from the page cache to a new line in the Path Exclusions text area.

By default, SpinupWP excludes the following paths from the cache:

/wp-admin/
/wp-json/
/xmlrpc.php
/wp-.*.php
/feed/
index.php
sitemap(_index)?.xml
/cart/
/basket/
/checkout/
/my-account/

Be aware that these default paths will exclude nested paths. For example, /my-account/settings/ and /my-account/orders/ will be excluded from the page cache.

While these default exclusions serve as a good starting point for most sites, you’re free to completely customize the cache exclusions. At any time, you can click on the Reset to Default button to restore the SpinupWP defaults.

To customize the cookie exclusions, you can add the cookie names you want to exclude from the page cache to a new line in the Cookie Exclusions text area.

By default, SpinupWP excludes the following cookies from the cache:

comment_author
wordpress_[a-f0-9]+
wp-postpass
wordpress_no_cache
wordpress_logged_in
edd_items_in_cart
woocommerce_items_in_cart

Ignored Query String Parameters

If you want certain query string parameters to be ignored so that requests containing them can still be cached, add them to the Ignored Query String Parameters field.

By default, SpinupWP will ignore the following query string parameters:

__s
_ga
_ke
[a-zA-Z0-9_-]+_sid
adgroupid
age-verified
ao_noptimize
campaignid
ck_subscriber_id
cn-reloaded
dclid
epik
fb_action_ids
fb_action_types
fb_source
fbclid
gclid
jobid
mc_cid
mc_eid
mkt_tok
msclkid
ref
session_[a-zA-Z0-9_-]+_alive
sseid
sslid
usqp
utm_[a-zA-Z0-9_-]+

Be aware that ignored query string parameters are excluded from the cache key, so the same cached version will be served, regardless of the value of the parameter. Only parameters like tracking parameters, that don’t impact the content of the page, should be included here.

Also note that regex patterns are supported, so utm_[a-zA-Z0-9_-]+ will include any UTM parameter like utm_source, utm_medium, and utm_campaign.

Page Cache Headers

When the page cache is enabled in SpinupWP all responses will have the Fastcgi-Cache header present. This header can have 1 of 3 values:

MISS – The page is not cached but will be on subsequent requests
HIT – The page is cached
BYPASS – The page is excluded from the page cache

You can use these values to help debug page caching issues.