20
CFML Language Reference
CFCACHE
CFCACHE allows you to speed up pages considerably in cases where the dynamic
content doesn’t need to be retrieved each time a user accesses the page. To accomplish
this, it creates temporary files that contain the static HTML returned from a particular
run of the ColdFusion page.
You can use CFCACHE for simple URLs and URLs that contain URL parameters.
Syntax
<CFCACHE
ACTION="action"
PROTOCOL="protocol name"
TIMEOUT="timeout date-time"
DIRECTORY="directory name for map file"
CACHEDIRECTORY="directory name for cached pages"
EXPIREURL="wildcarded URL reference"
PORT= "port-number">
ACTION
Optional. Specifies one of the following:
•
CACHE — Specifies server-side caching. The default is CACHE.
•
FLUSH — Refresh the cached page. If you specify FLUSH, you can also specify
the DIRECTORY and EXPIREURL attributes.
•
CLIENTCACHE —Specifies browser caching.
•
OPTIMAL—Specifies optimal caching through a combination of server-side
and browser caching.
See the Usage section for more information.
PROTOCOL
Optional. Specifies the protocol used to create pages from cache. Specify either
HTTP:// or HTTPS://. The default is HTTP://.
TIMEOUT
Optional. DateTime that specifies the oldest acceptable cached page. If the cached
page is older than the specified datetime, ColdFusion refreshes the page. By
default, ColdFusion uses all cached pages. For example, if you want a cached file
to be no older than 4 hours, code the following:
<CFCACHE TIMEOUT="#DateAdd("h", "-4", Now() )#">
DIRECTORY
Optional. Used with ACTION=FLUSH. Specifies the fully qualified path of a
directory containing the cfcache.map to be used when ACTION=FLUSH. The
default is the directory of the current page.
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...