ehcache/ehcache3 — pull request #155 by lorban (2014-11-17 18:23:01+00:00)
Title: Issues 35 & 42

Copy on r/w is a ehcache 2 concept that only ever was truly useful for the on-heap store, as it's the only store that is capable of storing references.

Since the on-heap store needs to be capable of storing either by ref (we want that perf) or by value (107 mandates that) some store-specific config and code is a much simpler and cleaner way of achieving what we need.

The proposed impl. relies on the SerializationProvider to create copies when the on-heap store is configured to store values. Chris D. suggested that we should abstract that away as SerializationProvider is meant for serializing while the on-heap store requires some kind of "CopyProvider" instead that could make copies in more efficient ways than using a serialization mechanism. I did NOT include this abstraction as IMHO it is not something that would meet very much use, I am more in favor of eventually creating a new task and making that work after the alpha release if we decide we want to do that.

Note: the configuration is done with the OnHeapStoreServiceConfig class. I noticed there already is a HeapResourceCacheConfiguration class that at first look seems like a nice place to put the extra config flag. But the latter class is used in the code to trigger configuration of capacity eviction and I'm not sure if we want to refactor that too. I decided against, but I'm open to hear arguments in favor or against combining both settings in a single config class.