
52
Chapter 2: ColdFusion Tags
Attributes
Usage
Use this tag in pages whose content is not updated frequently. Taking this action can greatly
improve the performance of your application.
The output of a cached page is stored in a file on the client browser and/or the ColdFusion server.
Instead of regenerating and downloading the output of the page each time it is requested,
ColdFusion uses the cached output. ColdFusion regenerates and downloads the page only when
the cache is flushed, as specified by the
timespan
attribute, or by invoking
cfcache
action=flush
.
To enable a simple form of caching, put a
cfcache
tag, specifying the
timespan
attribute, at the
top of a page. Each time the specified time span passes, ColdFusion flushes (deletes) the copy of
the page from the cache and caches a new copy for users to access.
Attribute
Req/Opt
Default
Description
action
Optional
cache
•
cache: server-side and client-side caching.
•
flush: refresh cached page(s).
•
clientcache: browser-side caching only. To cache a
personalized page, use this option.
•
servercache: server-side caching only. Not
recommended.
•
optimal: same as "cache".
directory
Optional
cf_root/cache Absolute path of cache directory.
timespan
Optional
Page is
flushed only
when
cfcache
action
=
"flush"
is
executed
The interval until the page is flushed from the cache.
•
A decimal number of days. For example:
■
- ".25", for one-fourth day (6 hours)
■
- "1", for one day
■
- "1.5", for one and one half days
•
A return value from the
CreateTimeSpan
function; for
example,
"#CreateTimeSpan(0,
6,
0,
0)#".
expireURL
Optional
Flush all
cached pages
Used with
action
=
"flush"
. A URL reference.
ColdFusion matches it against the mappings in the
specified cache directory. Can include wildcards. For
example:
"*/view.cfm?id=*"
.
username
Optional
A username. Provide this if the page requires
authentication at the web server level.
password
Optional
A
password.
Provide this if the page requires
authentication at the web server level.
port
Optional
The current
page port
Port number of the web server from which the URL is
requested. In the internal call from
cfcache
to
cfhttp
,
ColdFusion resolves each URL variable in the page;
this ensures that links in the page remain functional.
protocol
Optional
The current
page protocol
Protocol that is used to create URL from cache.
•
http://
•
https://
Содержание COLFUSION MX 7-CFML
Страница 1: ...COLDFUSION MX7 CFML Reference...
Страница 20: ...20 Chapter 1 Reserved Words and Variables...
Страница 50: ...50 Chapter 2 ColdFusion Tags cfelse br Searching cfif cfloop cfif...
Страница 101: ...cfdefaultcase 101 cfdefaultcase cfswitch cfoutput Your grade is grade cfoutput...
Страница 115: ...cfdocumentsection 115 cfdocumentsection cfoutput cfdocument...
Страница 311: ...cfNTauthenticate 311 Please Try again H2 cfif cfoutput cfinclude template loginform cfm cfabort cfif cfif cflogin...
Страница 411: ...cftable 411 cftable body html...
Страница 515: ...Chr 515 maxlength 5 p input type Submit name input type RESET cfform...
Страница 605: ...GetEncoding 605 WriteOutput The encoding is theEncoding cfscript cfif...
Страница 629: ...GetProfileString 629 tr td input type Submit name Submit value Submit td td td tr table form...
Страница 655: ...IIf 655 cfoutput IIf Hour Now GTE 12 DE It is afternoon or evening DE It is morning cfoutput b...
Страница 664: ...664 Chapter 3 ColdFusion Functions cfelse h3 Conversion error h3 cfif...
Страница 687: ...IsStruct 687 cfoutput cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Страница 693: ...IsWDDX 693 struct data wddxPacket hr xmp cfoutput packet xmp IsWDDX returns IsWDDX packet br cfoutput...
Страница 751: ...LSDateFormat 751 hr noshade cfoutput cfloop...
Страница 861: ...StructFind 861 cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Страница 869: ...StructIsEmpty 869 cfoutput cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Страница 903: ...Val 903 value Is the beginning numeric name form...
Страница 932: ...932 Chapter 3 ColdFusion Functions...
Страница 944: ...944 Chapter 4 ColdFusion MX Flash Form Style Reference...
Страница 962: ...962 Chapter 5 Application CFC Reference...
Страница 1008: ...1008 Chapter 6 ColdFusion MX Event Gateway Reference cfset retValue Reason reason cfreturn retValue cffunction...
Страница 1054: ...1054 Chapter 6 ColdFusion MX Event Gateway Reference...