Whatever message this page gives is out now! Go check it out!
CacheGetAllIds(cacheName, isAccurate)Parameter | Description |
cacheName | The name of the cache region |
| isAccurate | (Optional) Boolean. Default is True. When set to false, CacheGetAllIds will return the result faster. However, the result may not be accurate. If you need only the IDs of valid (unexpired) objects from the cache, set accurate to true. If you set accurate to false, the IDs of all the objects in the cache will be returned. |
<cfscript>
// create a cache region with no properties
rProps={};
CacheRegionNew("myRegion",rProps,true);
// create cache timespan and idle time
timeToLive = CreateTimeSpan(0, 0, 30, 0);
timeToIdle = CreateTimeSpan(0, 0, 30, 0);
// define objects to be inserted into cache region
foo1=foo2=foo3={};
// populate the cache with ids and objects
cachePut("1", "foo1", timeToLive, timeToIdle, "myRegion");
cachePut("2", "foo2", timeToLive, timeToIdle, "myRegion");
cachePut("3", "foo3", timeToLive, timeToIdle, "myRegion");
// display the ids. Ids are displayed as array
Writedump(CacheGetAllIds("myRegion",true));
</cfscript>