@ -101,7 +101,7 @@ public class CaffeineCacheManager implements CacheManager {
@@ -101,7 +101,7 @@ public class CaffeineCacheManager implements CacheManager {
@ -8160,6 +8160,7 @@ materialized by the `org.springframework.cache.Cache` and
@@ -8160,6 +8160,7 @@ materialized by the `org.springframework.cache.Cache` and
There are <<cache-store-configuration,a few implementations>> of that abstraction
available out of the box: JDK `java.util.concurrent.ConcurrentMap` based caches,
https://code.google.com/p/guava-libraries/wiki/CachesExplained[Guava caches] and
JSR-107 compliant caches. See <<cache-plug>> for more information on plugging in
other cache stores/providers.
@ -8996,7 +8997,7 @@ we did in the example above by defining the target cache through the `cache:defi
@@ -8996,7 +8997,7 @@ we did in the example above by defining the target cache through the `cache:defi
[[cache-store-configuration]]
=== Configuring the cache storage
Out of the box, the cache abstraction provides several storages integration. To use
Out of the box, the cache abstraction provides several storage integration. To use
them, one needs to simply declare an appropriate `CacheManager` - an entity that
controls and manages ++Cache++s and can be used to retrieve these for storage.
@ -9054,6 +9055,42 @@ This setup bootstraps the ehcache library inside Spring IoC (through the `ehcach
@@ -9054,6 +9055,42 @@ This setup bootstraps the ehcache library inside Spring IoC (through the `ehcach
is then wired into the dedicated `CacheManager` implementation. Note the entire
ehcache-specific configuration is read from `ehcache.xml`.
[[cache-store-configuration-caffeine]]
==== Caffeine Cache
Caffeine is a Java 8 rewrite of Guava's cache and its implementation is located under
`org.springframework.cache.caffeine` package and provides access to several features
of Caffeine.
Configuring a `CacheManager` that creates the cache on demand is straightforward: