User Guide
cfcache 59
cfcache
Description
Stores a copy of a page on the server and/or client computer, to improve page rendering
performance. To do this, the tag creates temporary files that contain the static HTML returned
from a ColdFusion page.
Use this tag if it is not necessary to get dynamic content each time a user accesses a page.
You can use this tag for simple URLs and for URLs that contain URL parameters.
Category
Page processing tags
Syntax
<cfcache
action = "action"
directory = "directory_name"
timespan = "value"
expireURL = "wildcarded_URL_reference"
username = "username"
password = "password"
port = "port_number"
protocol = "protocol">
See also
cfflush, cfheader, cfhtmlhead, cfsetting, cfsilent
History
ColdFusion MX:
• Deprecated the timeout and cachedirectory attributes. They might not work, and might
cause an error, in later releases.
• Added the timespan attribute.
• Changed how pages are cached: the default action attribute value, cache, caches a page on
the server and the client. (In earlier releases, this option cached a page only on the server.)
• Changed the source of the protocol and port values: the default protocol and port values
are now taken from the current page URL. (In earlier releases, they were
"http"and "80",
respectively.)
• Changed how session state is handled when caching a page: this tag can cache pages that
depend on session state, including pages that are secured with a ColdFusion login. (In earlier
releases, the session state was cleared when caching the page, causing authentication to be lost.)
• Changed how files are cached: this tag uses a hash() of the URL for the filename to cache a file.
(In earlier releases, ColdFusion used the cfcache.map file.)