Clearing the Static Cache

Note that the Static Server Cache is not enabled on staging sites.

Matthew Gabriel

Last Update 10 maanden geleden

Static Server Cache:

This is page caching at the server level using FastCGI. Much faster than any PHP plugin, Static Server Cache greatly speeds up your site and allows for an average of 10 times more concurrent visitors.


Static Server Cache can be toggled On or Off by clicking the button to the right.

Clicking the On/Off toggle will pop open a modal window with additional options that you can configure. Your configuration here will be saved even if you temporarily disable the cache for any reason.


  • Enable / Disable Static Server Cache – Toggle the cache on or off while keeping other options saved.
  • Allow Caching Query String (Params) – Enter any query strings (e.g., ref, utm_source, utm_medium, utm_campaign, etc), one per line, that you want to be cached.
  • Exclude Urls From Caching – Enter any site URLs or URL strings that you don’t want cached. E.g., if you add /blog it will also exclude /blog/samplepost or parentpage/blog/ from the cache. See also Static server cache exclusions on a multisite network.
  • Cache Lifetime – Select the expiry time for the cache. Cache will regenerate automatically each time it clears

When it’s enabled, simply click the Clear button if you need to clear the Static Server Cache, then click the Continue button in the modal to confirm. Note that this cache also clears itself automatically every hour.

Compatibility

The Hummingbird page cache is automatically disabled if the static server cache is enabled. However, clicking the Clear Cache button on the Hummingbird Page Caching module will clear the static server cache. You can also manually clear the static server cache in individual posts & pages when performing updates.

WooCommerce is supported by default, meaning that any dynamic process in Woo is not cached. So if a user adds items to their cart, etc, that would not be cached by the Static Server Cache, so no worries there.

What does it cache exactly?

The following should give you a good idea about what does and does not get cached when Static Server Cache is enabled.

• GET/HEAD requests are cached (that’s your content; meaning all your posts, pages, etc.).

• POST requests are skipped (for example, forms or any other frontend submission).

• Query strings are skipped.

• wp-admin, xmlrpc, wp-*.php, feed, index.php, sitemap URIs are skipped.

• Cache is skipped if these cookies are found: comment_author, wordpress_, wp-postpass, wordpress_no_cache, wordpress_logged_in, woocommerce_items_in_cart.

• Cache is skipped if these WooCommerce URIs are found: /store, /cart, /my-account, /checkout, /addons.

• The max size of any item is 1Gb.

Are any query strings cached by default?

Newly created sites will have the following query strings cached by default. Note that no query strings are cached by default on existing sites, so you can add any that you may need according to your site’s current configuration.

ref

utm_source

utm_medium

utm_campaign

utm_term

utm_content

utm_expid

fbclid

fb_action_ids

fb_action_types

fb_source

mc_cid

mc_eid

gclid

dclid

_ga

campaignid

adgroupid

_ke

cn-reloaded

age-verified

ao_noptimize

usqp

mkt_tok

epik

ck_subscriber_id

How to see if it’s working

To check any page to see if it’s being cached by our Static Server Cache, pop open your browser’s developer tools, and click on the Network tab. Then reload your page.


Have a look at the Response Headers for the main document type of your page, and look for x-cache where you’ll see the following possible values.


• x-cache: BYPASS – Cache is bypassed for any reason (URL parameter, cookie, WooCommerce, logged in etc.).

• x-cache: MISS – It will be cached on next page load.

• x-cache: HIT – Cache is served.

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us