Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As such we can get rid of the backport-util imports in favour of java utils.

 

API changes

CacheManager

Creation of, access to, and removal of caches is controlled by the net.sf.ehcache.CacheManager. CacheManager supports two creation modes: singleton and instance.

Ehcache 1.5 allowed any number of CacheManagers with the same name (same configuration resource) to exist in a JVM. Therefore, each time new CacheManager(...) was called, a new CacheManager was created without regard to existing CacheManagers. info.magnolia.module.cache.ehcache.EhCacheFactory simply instantiates a new CacheManager on any module start.

Since Ehcache 2.5.2 the behavior of the CacheManager creation methods is as follows:

No Format
CacheManager.newInstance(Configuration configuration) – Create a new CacheManager or return the existing one named in the configuration.
CacheManager.create() – Create a new singleton CacheManager with default configuration, or return the existing singleton. This is the same as CacheManager.getInstance().
CacheManager.create(Configuration configuration) – Create a singleton CacheManager with the passed-in configuration, or return the existing singleton.
new CacheManager(Configuration configuration) – Create a new CacheManager, or throw an exception if the CacheManager named in the configuration already exists or if the parameter (configuration) is null.

...

The cache module already provides its own support for terminating stale requests and let them timed out. Moving to what ehcache comes with is perhaps not necessary at this point.

Other notes

  • changed meaning of maxElementsInMemory=0 for MemoryStore to be unlimited.
  • extended existing in-memory and on-disk concepts to include off-heap as an additional possible location.

...