Whatever message this page gives is out now! Go check it out!
cacheGetSession(objectType,[isKey])Parameter | Description |
objectType | Any of the following values:
|
isKey | (Optional) Set to true if objectType is user-defined cache. The default value is false. |
<cache
name="customcache"
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="720"
timeToLiveSeconds="720"
overflowToDisk="true"
diskSpoolBufferSizeMB="10"
maxElementsOnDisk="100000"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="3600"
memoryStoreEvictionPolicy="LRU"/><!--- put an object into user-defined object cache --->
<cfset cachePut("cache1","hello",15,15,customCache)>
<!--- get underlying user-defined object cache --->
<cfset objectCache = cachegetsession(customCache,true)>
<!--- get/print user-defined object cache properties --->
<cfset config = objectCache.getCacheConfiguration()>
<cfoutput>
getMaxElementsInMemory() :: #config.getMaxElementsInMemory()#<br>
isEternal() :: #config.isEternal()#<br>
getTimeToIdleSeconds() :: #config.getTimeToIdleSeconds()#<br>
getTimeToLiveSeconds() :: #config.getTimeToLiveSeconds()#<br>
isOverflowToDisk() :: #config.isOverflowToDisk()#<br>
getDiskSpoolBufferSizeMB() :: #config.getDiskSpoolBufferSizeMB()#<br>
getMaxElementsOnDisk() :: #config.getMaxElementsOnDisk()#<br>
isDiskPersistent() :: #config.isDiskPersistent()#<br>
getDiskExpiryThreadIntervalSeconds() :: #config.getDiskExpiryThreadIntervalSeconds()#<br>
getMemoryStoreEvictionPolicy() :: #config.getMemoryStoreEvictionPolicy()#<br>
isClearOnFlush() :: #config.isClearOnFlush()#<br>
</cfoutput><!--- put an object into user-defined object cache --->
<cfset cachePut("cache1","hello",15,15)>
<!--- get underlying user-defined object cache --->
<cfset objectCache = cachegetsession("object",true)>
<!--- get/print user-defined object cache properties --->
<cfset config = objectCache.getCacheConfiguration()>