Title:
Bug 81841:(Watson Migration Closure)DiskStore Configuration is only Configurable in ehcache
| View in TrackerStatus/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Rob Bilson / Rob Brooks-Bilson (Rob Bilson)
Created: 01/28/2010
Components: Caching
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 2
Problem:
DiskStore Configuration is only Configurable in ehcache.xmlIn ehcache.xml, there’s a configurable property called <diskStore> that’s set by default to point to your Java temp directory:<diskStore path="java.io.tmpdir"/>You can change this to any path you want in ehcache.xml and it applies globally.The ColdFusion documentation for the cacheSetProperties() tag currently shows that diskstore is a valid option:http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c18.htmlMy testing, however, has shown that is not working in the shipping build of ColdFusion 9. Try the following example (you’ll need to create a directory off your root, c:/temp):<cfset myProps = structNew()><cfset myProps.diskstore = "c:/temp"> <!--- in the docs, but not currently implemented ---><cfset myProps.diskpersistent = "true"><cfset myProps.eternal = "false"><cfset myProps.maxelementsinmemory = "5000"><cfset myProps.maxelementsondisk = "100000"><cfset myProps.memoryevictionpolicy = "LRU"><cfset myProps.objecttype = "Object"><cfset myProps.overflowtodisk = "true"><cfset myProps.timetoidoleconds = "86400"><cfset myProps.timetolivesecond = "86400">Before:<cfdump var="#cacheGetProperties("Object")#"><!--- update the cache properties ---><cfset cacheSetProperties(myProps)>After:<cfdump var="#cacheGetProperties("Object")#"><cfset cachePut("item1", "this is a test")> If you run this code and check the c:/temp directory you should find it empty. Check your jave temp directory (c:/windows/temp on wintel) and you’ll see that the files are still written there showing that the default value in ehcache.xml is being used and not the value being set in the cacheSetProperties() function.The obvious action is to remove this attribute from the documentation until it can be implemented in a later version of ColdFusion. I would like to see it implemented, though, as I think it’s useful to be able to set the diskstore location programmatically.
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040844
External Customer Info:
External Company:
External Customer Name: Rob Brooks-Bilson
External Customer Email: 6B546ECA439559160AAC0C16
External Test Config: 01/28/2010
Attachments:
Comments: