Name
CFCACHE
Synopsis
<CFCACHE>
Caches a ColdFusion page for faster access by writing a temporary
static HTML version of the page to disk (either server-side or in the
client’s browser cache). To cache a ColdFusion template, just
add the CFCACHE tag to the top of the page.
When the CFCACHE tag caches a page, two files are
actually written to the server. First, a temporary file (with a
.tmp extension) is created that contains the
HTML necessary to generate the static version of the page. A mapping
file (written as cfcache.map) contains the
mapping to the temp file, as well as a timestamp that determines when
to expire the cached file. When using the CFCACHE
tag, there are a few additional points that should be considered:
Templates that generate errors don’t get cached.
By default, the
CFCACHEtag suppresses all debugging information for a ColdFusion template. To use debugging within a cached page, you must explicitly turn it on for the template using theCFSETTINGtag.
Simultaneous Requests in the ColdFusion Administrator must be set to a minimum of
2for theCFCACHEtag to work.
Attributes
-
ACTION="cache|clientcache|flush|optimal The action to be performed by the
CFCACHEtag. Optional. The default isCache, which caches the page.ClientCachecaches the page in the client’s browser,Flushrefreshes the cached page, andOptimalcaches the page using both server-side and browser caching.-
PROTOCOL="protocol_name" The protocol to use when creating the pages from the cache. Options ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access