Description

Removes a specified cache region.

Returns

Nothing

History

ColdFusion 10: Added this function.

Syntax

cacheRegionRemove(region)

Properties

Parameter

Description

region

Name of the cache region that has to be removed.

Example

<cfscript>
       //define a cache region struct
       rProps={};
       // define properties for region struct
       rProps.MAXELEMENTSINMEMORY = "5";
       rProps.ETERNAL = "false";
       rProps.TIMETOIDLESECONDS = "100";
       rProps.TIMETOLIVESECONDS = "50";
       rProps.OVERFLOWTODISK = "true";
       rProps.DISKEXPIRYTHREADINTERVALSECONDS = "3600";
       rProps.DISKPERSISTENT = "false";
       rProps.DISKSPOOLBUFFERSIZEMB = "30";
       rProps.MAXELEMENTSONDISK = "10";
       rProps.MEMORYEVICTIONPOLICY = "LRU";
       rProps.CLEARONFLUSH = "true";
       rProps.OBJECTTYPE = "OBJECT";
       // create a cache region, kRegion, that contains the properties defined above
       CacheRegionNew("kRegion",#rProps#,true);
       // display the properties of the newly created cache region
       WriteDump(CacheGetProperties("kRegion"));
       // remove the cache region
       WriteOutput("removing cache region....");
       CacheRegionRemove("kRegion");
       // try-catch to determine whether the cache region is removed
       try{
             writedump(CacheGetProperties("kRegion"));
       }
       catch(any e){
             WriteOutput("Error: " & e.message);
       }
</cfscript>

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