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="CACHE" or "FLUSH" or "CLIENTCACHE" or "OPTIMAL"
    PROTOCOL="protocol_name"
    TIMEOUT="#DateAdd(datepart, number, date)#"
    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 ...

Get Sams Teach Yourself ColdFusion® in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.