Skip to content

{exp:stash:static}

Mark Croxton edited this page Jun 8, 2015 · 13 revisions

Cache an entire page to a static file. Note that you cannot escape certain parts of your template to remain dynamic when using the static cache.

Simply place this tag anywhere in your template.

{exp:stash:static}

Parameters

name = [ string ]

The name of your cached variable (optional).

context = [ string ]

Define a context for your cached variable (optional). This is essentially a prefix for the name. Use to 'tag' your variables, in order to use as a target for cache-breaking.

refresh = [ int ]

The number of minutes to store the cache (optional, default is 0 - never). Note that this will only work reliably when using Mustash and a CRON job for cache-pruning.

logged_out_only = [ yes | no ]

Only cache when the user is logged in.

logged_in_only = [ yes | no ]

Only cache when the user is logged out.

save = [ yes | no ]

Enable or disable caching (default="yes").

Clone this wiki locally