Whatever message this page gives is out now! Go check it out!

CacheRegionRemove

Last update:
May 18, 2026

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>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page