Copy link to clipboard
Copied
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSd160b5fdf5100e8f-7018704d129d9eeda9f-8000.html
Copy link to clipboard
Copied
There are two problems with the info here.
First is a mistake in the code example above, showing how to get the info for a cached called "customcache" (shown as defined in the ehcache.xml fragment). The example shows doing this: cachegetsession(customCache,true), when instead that first argument should be the the NAME of the customcache. Since you show no variable being defined called customCache, that line would fail. Instead, the line should be cachegetsession("customcache",true).
BTW, readers (and any doc folks who'd correct this) should note that it should also NOT be cachegetsession("customCache",true), as this use of cache name in this function is case-sensitive. (It may have made sense if the writer meant for there to be a variable of that name, where camelcase is then allowed. But since the XML file shows the cachename being all lower-case, it must be specified as lowercase as the first argument to this function.)
So second, the parameters box above mentioning this argument (of an optional custom cache name) should be modified to clarify that name of the custom cache is case-sensitive.