• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009


Currently, you can not configure ehcache to not use a diskstore - even if you don’t allow any cache to overflow, you still need to configure a (unique) diskstore.

How about making it optional, and throwing errors if you try to overflow to disk without one? Sourceforge Ticket ID: 1728061 - Opened By: robertdw - 30 May 2007 06:06 UTC


Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320 Originator: NO

This is a good idea and well overdue. Sorry about the delay in implementing it.

I have implemented this in ehcache 1.5 which will be out in beta soon. The change is in trunk.

The documentation on how it works is as below (in APT format):

** «>>s are Optional

 The diskStore element in ehcache.xml is now optional (as of 1.5). If all caches use only <<<MemoryStore>>>s,
 then there is no need to configure a diskStore. This simplifies configuration, and uses less threads.
 It is also good where where multiple CacheManagers are being used, and multiple disk store paths
 would need to be configured.

 If one or more caches requires a DiskStore, and none is configured, java.io.tmpdir will be used and
 a warning message will be logged to encourage explicity configuration of the diskStore path.

*** Turning off disk stores

To turn off disk store path creation, comment out the diskStore element in ehcache.xml.

The <<<ehcache-failsafe.xml>>> configuration uses a disk store. This will remain the case so as to not affect
existing ehcache deployments. So, if you do not wish to use a disk store make
sure you specify your own ehcache.xml and comment out the diskStore element.

Comment by: gregluck - 4 May 2008 20:57 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira