tracker issue : CF-3041874

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

Bug 83804:(Watson Migration Closure)Ehcache 2

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): Rob Bilson / Rob Brooks-Bilson (Rob Bilson)

Created: 08/11/2010

Components: Caching

Versions: 9.0.1

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Problem:

Ehcache 2.1.0 added two new configurable parameters to caches: copyOnRead and copyOnWrite.  From their docs:A cache can be configured to copy the data, rather than return reference to it on get or put. This is configured using the copyOnRead and copyOnWrite attributes of cache and defaultCache elements in your configuration or programmatically as follows:    CacheConfiguration config = new CacheConfiguration("copyCache", 1000).copyOnRead(true).copyOnWrite(true);    Cache copyCache = new Cache(config);The default configuration will be false for both options.In order to copy elements on put()-like and/or get()-like operations, a CopyStrategy is being used. The default implementation uses serialization to copy elements. You can provide your own implementation of net.sf.ehcache.store.compound.CopyStrategy like this:    <cache name="copyCache"           maxElementsInMemory="10"           eternal="false"           timeToIdleSeconds="5"           timeToLiveSeconds="10"           overflowToDisk="false"           copyOnRead="true"           copyOnWrite="true">        <copyStrategy class="com.company.ehcache.MyCopyStrategy"/>    </cache>Per cache, a single instance of your CopyStrategy will be use, hence your implementation of CopyStrategy.copy(T): T has to be thread-safe.I'd like to see copyOnRead and copyOnWrite implemented in ColdFusion's cacheSetProperties() and cacheGetProperties() functions, as well as the proposed cacheNew() function.
Method:


Result:

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

Watson Bug ID:	3041874

External Customer Info:
External Company:  
External Customer Name: Rob Brooks-Bilson
External Customer Email: 6B546ECA439559160AAC0C16
External Test Config: 08/11/2010

Attachments:

Comments: