Welcome to ehcache

Ehcache is a widely used java distributed cache for general purpose caching, Java EE and light-weight containers.

It features memory and disk stores, replicate by copy and invalidate, listeners, cache loaders, cache extensions, cache exception handlers, a gzip caching servlet filter and much more ...

Ehcache is available under an Apache open source license and is actively developed, maintained and supported.

Latest News

17 July 2008: ehcache-standalone-server 0.1 released

The standalone server provides a ready to go cache server out of the box, using the WAR from the ehcache-server module. Unix-based and Windows servers are supported.

Start it with java -jar ../lib/ehcache-standalone-server-0.1.jar 8080 ../war or the jsvc wrapper with daemon.sh start.

12 July 2008: ehcache-server-0.1 released

This is the first version of an ehcache W3C Web Services server, packaged as a WAR. This version is made available for testing. See the documentation .

Two APIs are supported: A soap API specified in EhcacheWebServiceEndpointService.wsdl and a RESTful, resource oriented API. This release provides a feature-complete soap API. The RESTful API is not yet feature complete.

12 July 2008: ehcache-debugger-1.5.0 released

This is a standalone ehcache debugger used to monitor RMI cache clusters. It is available from Maven central or the downloads page.

12 July 2008: ehcache-1.5.0 released

Ehcache 1.5.0 is a major new release.

New Features
  • Added JGroups Implementation. Thanks to Pierre Monestie for the patch(es) for this. Though new to the core distribution JGroups replication has been in production use in a large cluster for the last year. JGroups has a "provided" scope. So, anyone wishing to use this form of replication will need to add it to their dependencies.
  • CachingFilter performance improvements
  • Constructs performance improvements
  • added loadAll() to the loader implementation to enable preload without specifying keys.
  • diskPersistent now can be used with caches that use only MemoryStore in normal use but want to persist to disk
  • DiskStores are now optional. The element is now non-mandatory. This will simplify configurations particularly where multiple CacheManagers are being used. 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.
  • The default RMI based cache replication can now configure a RemoteObject port so that it can be easily configured to work through firewalls. This is done by adding a new property remoteListenerPort to RMICacheManagerPeerListenerFactory to enable it to be specified.
  • Added a new system property expansion token "ehcache.disk.store.dir" to DiskStore configuration which can be used to specify the DiskStore directory on the command line or in an environment variable.
        e.g. java -Dehcache.disk.store.dir=/u01/myapp/diskdir ...
  • Added the ability to specify system property tokens using $tokenname in ehcache.xml which are then replaced when the configuration is loaded.
  • Updated the remote debugger with enhanced reporting and better documentation (See Logging page in the documentation).

    The new version prints a list of caches with replication configured, prints notifications as they happen, and periodically prints the cache name, size and total events received.

    Note that the debugger is gaining more attention and is now distributed in its own tar ball. It has also moved to its own pure maven build and has additional testing.

Summary of Bug Fixes
  • CachingFilter bug fixes for various rare edge conditions
  • Major speed up to shutdown process when diskPersistent is not being used
  • Fixed various shutdown exception when both Hibernate and Spring both try to destroy caches

    See the changelog for complete details.

7 June 2008: ehcache-1.5.0-beta2 release

Ehcache 1.5.0-beta2 provides a couple of fixes to changes made in beta1. If you are testing 1.5 please use this version.

13 May 2008: ehcache-1.5.0-beta1 release

Ehcache 1.5.0-beta1 provides a host of new features and a few bug fixes. (See the ehcache-1.5.0 final release news item).

1 March 2008: ehcache is SourceForge project of the month

Ehcache has been honoured as the February 2008 SourceForge project of the month. See http://sourceforge.net/community/index.php/potm-200802/ .

21 February 2008: ehcache-1.4.1 maintenance release

The version of ehcache is a minor maintenance release. The main reason for the release was to include ehcache-failsafe.xml which was omitted from the public maven repository version. See the changelog for complete details.

31 January 2008: ehcache-1.4 released

The final version of ehcache-1.4 is available on sourceforge and the Maven central repository.

This version significantly enrichens the ehcache API and enhances extension of ehcache. The new features are:

  • You can now define CacheLoaders in the ehcache core API. They supplement the existing SelfPopulatingCache. They can be configured in ehcache.xml or programmatically. They can be used for cache warming, and simple pull-through caching. See the Cache Loaders chapter in the documentation for more details.
  • You can now define a CacheExceptionHandler and register it progammatically or in ehcache.xml. This enables an exception handler to be registered with a cache so that it is called on exception rather than the exception being thrown. See the Cache Exception Handler chapter in the documentation for more details.
  • You can now define CacheExtensions and register them progammatically or in ehcache.xml. A CacheExtension is a generic facility which holds a reference to a cache and is bound to the cache lifecycle, making possible a wide variety of extensions to behaviour. Usage examples are a cache refresh timer or a file monitoring mechanism. See the Cache Extensions chapter in the documentation for more details.

    This final release follows the second beta release by a month and fixes a few minor issues. See changelog for complete details.

1 January 2008: ehcache-1.4-beta2 released

The beta 2 version of ehcache-1.4 is available on sourceforge and the Maven central repository.

The second beta release fixes 10 bugs, most of them in the new features being introduced in 1.4.0, reported by beta testers. See the changelog for complete details.

More news ...