Whatever message this page gives is out now! Go check it out!
Structure element | Description |
cache_hitcount | The number of cache entries have been used. |
cache_misscount | Number of times the object was requested, but was not in the cache or was not up to date (was stale). |
createdtime | The time when the element or object was cached. |
hitcount | Number of times the cached object has been used. |
idletime | The remaining time, in seconds, after which the cached object is purged if it is idle. |
lasthit | The time the cached object was last used, as a date-time object, or the empty string. |
lastupdated | The time the cached object was last modified, as a date-time object, or the empty string. |
size | The number of bytes the object takes up when serialized. |
timespan | The remaining time, in seconds, during which the cached object is valid. |
CacheGetMetadata(id, [cacheType,region])Parameter | Description |
id | The ID of the cached object. |
cacheType | Gets metadata for template caches. |
region | (Optional) The name of the cache region. |
<cfcache action="cache" timespan="#CreateTimeSpan(0,0,10,0)#" useQueryString="true" metadata="cachemetadata">
<cfoutput>-This date/time IS cached: #Now()#-<br /></cfoutput>
</cfcache><cfcache action="flush">
<!--- contruct the templatecacheid to pass to the getcachemetadata function --->
<cfset baseurl = "http://#cgi.server_name#:#cgi.server_port##getDirectoryFromPath(cgi.script_name)#cacheTemp.cfm">
<cfset pageid = hash(expandpath('cacheTemp.cfm'))>
<cfset lineno = 1>
<cfset templateCacheId = trim(ucase("#baseurl#_PAGEID:#pageid#_LINE:#lineno#"))>
<!--- cache the template --->
<cfhttp url="#baseurl#" />
<cfdump var="#getAllTemplateCacheIds()#"><br>
<!--- work with the returned metadata --->
<cfset templateMetaData = cachegetmetadata(templatecacheid,'Template')>
<cfdump var="#templateMetaData#">