EHC ❯ Update disk store on shutdown only with overflowToDisk and diskPersistent
-
New Feature
-
Status: Open
-
2 Major
-
Resolution:
-
ehcache-core
-
-
cdennis
-
Reporter: hostalp
-
October 20, 2010
-
0
-
Watchers: 0
-
October 11, 2011
-
Description
This is more a question or perhaps feature request.
Currently when both overflowToDisk and diskPersistent are set to true, the disk store is updated continuously at runtime:
http://ehcache.org/documentation/storage_options.html DiskStore / Persistence: The data file is updated continuously during operation of the Disk Store if overflowToDisk is true. Otherwise it is not updated until either cache.flush() is called or the cache is disposed.
This means that for cache with setup like:
maxElementsInMemory=”1000” overflowToDisk=”true” diskPersistent=”true”
the contents of memory store is continuously flushed to disk store even though memory store is allowed for several elements with just selected elements being moved to disk when memory store limit is reached.
How to achieve that memory store will overflow to disk with persistent disk store and disk store being updated only on shutdown, memory store overflow (and not continuously at runtime) etc? Should the cache be configured with maxElementsInMemory and diskPersistent only?
Chris can you update on what you think of this request?