How to control the way my site is cached


By Yair Uziel
Follow

First, a general concept of Incapsula's Caching mechanism:

If Acceleration Mode is set to Standard mode the caching mechanism respects all Caching-related headers, and will cache accordingly.
If it is set to Advanced (paid plans only), pages with negative cache instructions will also be cached in order to minimize the reaction time of the site 

The following headers must be set to indicate what resources can be cached by Incapsula and for what period of time. (These are standard HTTP headers, as defined in this W3 Protocol):

+ Max-age - if you wish for Incapsula to avoid caching a page, set it to 0 on that page. If you wish to have the items in the page cached, set it to a higher number (such as 3600).
Cache-Control  - if it's set to no-cache / private / must-revalidate / proxy-revalidate/ no-store – then it'll prevent caching by Incapsula, unless site Acceleration Mode is set to Aggressive.
+ Last-Modified – If the value is in the distant past, Incapsula instantly assumes it can be cached.
+ Vary – If it's set to anything other than "Accept-Encoding" the resource will not be cached, assuming different content (for example: for different client types or different client languages).

Please note that Incapsula will only display RFC compliant headers.

Non-Compliant Format example:    Last-Modified: Wednesday, 08-Mar-2017 12:39:13 GMT 

 Compliant Format:                            Expires: Wed, 08 Mar 2017 12:46:13 GMT

 

Note that a way to force cache purge on a specific page, is to use "Ctrl+F5" (depending on browser) as it is intended to abandon all cached content and just retrieve all content from the servers again.

In order to refresh all of the site's cached content you can turn the Acceleration Mode under Settings to Off, and then after 5 minutes turn it to On again.

 

Here are some more articles about caching:

How does caching works
Difference between the Incapsula caching options

Proprietary Dynamic Content Caching solution

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk