Removes all stored objects in a cache region. If no cache region is specified, objects in the default region are removed.
cacheRemoveAll( region )
→ returns void
// generate some data to cache
for ( i = 1; i <= 10; i++ ) {
cachePut( 'cache_#i#', "Test data #i#" );
}
function cacheObjCount() {
return arrayLen(cacheGetAllIds());
}
_numCacheObj = "Number of objects in the cache: ";
writeOutput('Before cacheRemove() :: #_numCacheObj# #cacheObjCount()#<br />');
// clear all objects from the cache
cacheRemoveAll();
writeOutput('After cacheRemove() :: #_numCacheObj# #cacheObjCount()#<br /><br />');
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.