Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCU-2700

...

alignright
classmenu

This page summarizes the features of Magnolia cache, lists the involved modulesmodules involved, and explains what is available in Community and Enterprise Editions. It also proposes alternatives for some of the third-party libraries.

The need to cache content is very different in developing, staging or production environments. If your system relies heavily on cache for performance, the system may be misconfigured or it suffers suffer from too small undersized servers.

Table of Contents
maxLevel3

...

Caching arbitrary objects

With Magnolia you can cache basically every object beyond the well-known page caching, for further details see . See caching arbitrary objects.

...

Magnolia has a separate Digital asset management module. Assets (for example such as images) and asset renditions served directly from Magnolia are cached by default. Assets served from external an DAM such as Cumulus DAM connector or Amazon S3 Connector module are not cached by Magnolia.

...

You can define flush policies - rules when the cache must be flushed. For instance, you can make the flush procedure depend on changes on JCR repositories.

...

Ehcache is Magnolia's default third-party low level cache implementation. (For more details see See below.)

Memcached implementation

Alternative third-party low level cache implementation. (For more details see See below.)

Cache Browser app

The Cache Browser app runs on an author instance and allows you to delete cache items on a granular level. The app will delete deletes cached items on all the public instances -, independent of your public instances setup - be it a single instance or a complex cluster.

...

Dynamic page caching allows you to cache fragments of a page which that also contains parts which that cannot be cached. DCP uses the SiteMesh module.

Cache

...

implementations

Magnolia cache uses established third-party libraries for the low-level functions. Depending on your production environment, one cache implementation may fit better than another. Please Please contact Magnolia Services to get the the best cache strategy for your project and server setup.

Anchor
anc-impl-ehcache
anc-impl-ehcache
Default implementation

...

: Ehcache 3

By default Magnolia uses Ehcache. The third-party library comes with is provided by and is configured with with the Magnolia Ehcache module3 module.

Ehcache version update to 2.10

Cache module version 5.4 (bundled with Magnolia 5.4) updated Ehcache from 1.5 to 2.10. 

Ehcache is a robust, proven and full-featured cache product which has made it the most widely-used Java cache. It provides off-heap storage capabilities and is fully compatibie with javax.cache API (JSR-107). 

Ehcache 3.x always keeps cached content Ehcache stores cached content to disk. On version 1.5, cached content was always kept on the disk as long as flushing was is not proactively requested. Version 2.10 deletes cached items when the server is stopped. As a consequence, when you restart the server, the cache store must be rebuilt again. Since a production system is stopped rarely the loss of the persistent cache store is typically not a problem. A production server is typically stopped only when updating Magnolia or if the server crashes.

However, if you want to use a cache that will persist between restarts of Magnolia, use the Memcached implementation.

...

Cached content is also retained if you must restart the system.

Alternative implementation: Memcached

Memcached is a high-performance, distributed memory object caching system. Magnolia's Memcached implementation  brings you the advantages of a distributed cache:

  • Sharing of cache items between multiple instances of Magnolia.
  • Cached items persist restart of Magnolia instance.
  • Memcached servers may run on any server in the network and thus won't so do not consume your server memory.

List of modules involved

...

Community Edition:

Children Display
pageCache modules

...