diff --git a/src/main/asciidoc/reference/caching.adoc b/src/main/asciidoc/reference/caching.adoc index bf76b03b6..006dd6776 100644 --- a/src/main/asciidoc/reference/caching.adoc +++ b/src/main/asciidoc/reference/caching.adoc @@ -69,13 +69,17 @@ public class AerospikeConfiguration { public AerospikeClient aerospikeClient() { ClientPolicy clientPolicy = new ClientPolicy(); clientPolicy.failIfNotConnected = true; - return new AerospikeClient(clientPolicy, aerospikeConfigurationProperties.getHost(), aerospikeConfigurationProperties.getPort()); + return new AerospikeClient(clientPolicy, aerospikeConfigurationProperties.getHost(), + aerospikeConfigurationProperties.getPort()); } @Bean - public AerospikeCacheManager cacheManager(AerospikeClient aerospikeClient) { + public CacheManager cacheManager(IAerospikeClient aerospikeClient, + MappingAerospikeConverter aerospikeConverter, + AerospikeCacheKeyProcessor cacheKeyProcessor) { AerospikeCacheConfiguration defaultConfiguration = new AerospikeCacheConfiguration("test"); - return new AerospikeCacheManager(aerospikeClient, mappingAerospikeConverter, defaultConfiguration); + return new AerospikeCacheManager(aerospikeClient, mappingAerospikeConverter, defaultConfiguration, + cacheKeyProcessor); } } ---- @@ -96,7 +100,7 @@ The heart of the cache layer, to define an AerospikeCacheManager you need: . aerospikeConverter (MappingAerospikeConverter). . defaultCacheConfiguration (AerospikeCacheConfiguration), a default cache configuration that applies when creating new caches. Cache configuration contains a namespace, a set (null by default meaning write directly to the namespace w/o specifying a set) and an expirationInSeconds (AKA TTL, default is 0 meaning use Aerospike server’s default). -. Optional: initalPerCacheConfiguration (Map), You can also specify a map of cache names and matching configuration, it will create the caches with the given matching configuration at the application startup. +. Optional: initialPerCacheConfiguration (Map), You can also specify a map of cache names and matching configuration, it will create the caches with the given matching configuration at the application startup. NOTE: A cache name is only a link to the cache configuration.