Whatever message this page gives is out now! Go check it out!
cacheIdExists(id ,[region])Parameter | Description |
id | (Required) The ID of the cached object. |
region | (Optional) The cache region where you check for the cached object. |
<cfscript>
// Create a new object
obj1 = {};
obj1.name = "hello world";
// Define the time to live and time to idle parameters
timeToLive=createtimespan(0,0,0,30);
timeToIdle=createtimespan(0,0,0,30);
writeOutput("Starting to write to cache..");
cachePut("id_obj1",obj1,timeToLive,timeToIdle,"customcache");
writeOutput("Done!!");
writeOutput("Trying to check if the cached item is present...");
writeOutput(cacheIdExists("obj1","customcache"));
</cfscript>