cfcache

Overview ColdFusion Open BlueDragon Lucee

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 CFML 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.

Attributes

Name Required Type Default Description
action No String * 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".
10
cachedirectory No String Path of the folder where cache is maintained
3
cachename No
9
dependson No String Comma seperated list of all variables on which this cache would depend
directory No String Absolute path of cache directory.
expireurl No String Used with action = "flush". A URL reference. CFML matches it against the mappings in the specified cache directory. Can include wildcards. For example: "*/view.cfm?id=*".
9
id No String Id of the cached object
9
3
idletime No Numeric Flushes the cached item if it is not accessed for the specified time span.
9
key No String Cache region name
9
3
metadata No String Name of the struct variable
9
3
name No String Name of return variable, valid with action="get"
password No String A password
port No Numeric Remote port to which to connect
protocol No String Protocol that is used to create URL from cache.
10
region No String Cache region name
9
stripwhitespace No Boolean false Reduces whitespace
9
3
throwonerror No Boolean A Boolean value specifying whether t throw an error if theflushaction encounters an error. Otherwise the action does not generate an error if it fails. If this attribute istrueyou can handle the error in acfcatchblock, for example, if a specified id value is invalid
10
timeout No Numeric Sets timeout value for the object being cached
Timespan No Timespan The interval until the page is flushed from the cache.
9
usecache No Boolean true To use cache or not (if false it will process the content each time)
9
useQueryString No Boolean false If true, generates a template cache ID that includes the query string. This means, that a new template cahce is created whenever the query string changes.If set to true, the attribute dependson considers the URL parameters defined in the querystring as well to generate template caches.
username No String A username
9
3
value No String For action="set", object which needs to be stored