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.
<cfcache>
cfcache();
cache
flush
clientcache
servercache
optimal
get
put
http://
https://
false
true
false
true
true
false
Puts HTML page into the cache and uses the cached version on subsequent calls to the page.
<cfcache action='optimal' directory='/path/to/directory' timespan='#createTimeSpan( 1, 0, 0, 0 )#' idletime='#createTimeSpan( 0, 12, 0, 0 )#'>
<div id="some-id">Hello World!</div>
</cfcache>
Expected Result: <div id="some-id">Hello World!</div>
Flushes the 'hello-world.cfm' page from the cache.
<cfcache action='flush' directory='/path/to/directory' expireURL='/hello-world.cfm'></cfcache>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.