tracker issue : CF-3521227

select a category, or use search below
(searches all categories and all time range)
Title:

Page Level Caching Does Not Work Correctly For Application Specific Caches

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Matthew Clemente / Matthew Clemente (Matthew Clemente)

Created: 03/15/2013

Components: Caching

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / CF10_Update14

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 1

Problem Description: If you define a custom ehcache.xml in application.cfc, full page caching with the <cfcache> tag ceases to work. Fragment caching continues to work as expected.

Steps to Reproduce:

application.cfc-
<cfcomponent> 
    <cfscript> 
        this.name = "appSpecificCacheTest"; 
        this.cache.configfile = "ehcache.xml"; 
    </cfscript> 
</cfcomponent>


ehcache.xml-
<?xml version="1.0" encoding="UTF-8"?> 
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:noNamespaceSchemaLocation="ehcache.xsd"> 
    
    <diskStore path="java.io.tmpdir"/> 
    
    <cacheManagerEventListenerFactory class="" properties=""/> 
    <defaultCache 
     maxElementsInMemory="5" 
     eternal="false" 
     timeToIdleSeconds="30" 
     timeToLiveSeconds="5" 
     overflowToDisk="true" 
     diskSpoolBufferSizeMB="30" 
     maxElementsOnDisk="10" 
     diskPersistent="false" 
     diskExpiryThreadIntervalSeconds="3600" 
     memoryStoreEvictionPolicy="LRU" 
     clearOnFlush="true" 
    /> 
    
</ehcache>

index.cfm-
<cfcache timespan="#createTimeSpan(0,0,0,5)#"> 
<h2>Cache Stuff for 5 Seconds</h2>
<cfoutput>
Currently #timeFormat(now(),'hh:mm:ss')# <br />
Random number: #rand()#
</cfoutput>	


Actual Result: Data updates with each refresh.

Expected Result: Data should be cached for 5 seconds.

Any Workarounds: You can use fragment caching, which still behaves as expected, by wrapping the content with a closing </cfcache> tag.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3521227

External Customer Info:
External Company:  
External Customer Name: mjclemente
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

I've verified this is an issue as well. It's an important fix for the adoption of Application level caches.
Vote by External U.
15980 | March 15, 2013 05:17:21 PM GMT
I've been able to replicate in ColdFusion 10, Updater 8.
Comment by External U.
15979 | March 15, 2013 05:17:47 PM GMT