Http Cache - Caffeine Store

« back to HTTP Cache Table of Contents


First of all, make sure that the caffeine cache bundle is present in the OSGI-Container of AEM. The code here was tested with caffeine version 2.6.2 but could / should work with other versions as well, especially higher ones.

Activating the store

To activate the caffeine store after the caffeine bundle is in a running state, simply define a sling:OsgiConfig


<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="" xmlns:cq=""
    xmlns:jcr="" xmlns:nt=""
  • httpcache.cachestore.caffeine.ttl TTL for all entries in this cache in seconds. Default to -1 meaning no TTL.
  • httpcache.cachestore.caffeine.maxsize Default to 10MB. If cache size goes beyond this size, least used entry will be evicted from the cache

Validating if the activation succeeded

After performing these steps, check the log files for any errors regarding CaffeineMemHttpCacheStoreImpl.

Also check the Felix Console to see if CaffeineMemHttpCacheStoreImpl is in an active state.

If active, you have successfully installed / configured the caffeine store.

Please report any issues with the Feature or documentation on the ACS AEM Commons GitHub Issue tracker.