Removes a specified cache region.
Nothing
ColdFusion 10: Added this function.
cacheRegionRemove(region)
Parameter |
Description |
|---|---|
region |
Name of the cache region that has to be removed. |
<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>
Sign in to your account