Description

Checks if the cache region exists.

Returns

True if the cache region exists.

History

ColdFusion 10: Added this function.

Syntax

cacheRegionExists(region__)

Properties

Parameter

Description

region

Name of the cache region.

Example

<!--- Checking if the region is present in the Cache ---> 
<cfif #cacheRegionExists("testregion")# EQ "YES"> 
<cfset cacheRegionRemove("testregion")> 
<cfif #cacheRegionExists("testregion")# EQ "NO"> 
<cfoutput>Region is deleted<br></cfoutput> 
</cfif> 
<cfelse> 
<cfset cacheRegionNew("testregion")> 
<cfset cacheRegionRemove("testregion")> 
<cfif #cacheRegionExists("testregion")# EQ "NO"> 
<cfoutput>Region is deleted<br></cfoutput> 
</cfif> 
</cfif>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy