List of usage examples for org.springframework.cache.concurrent ConcurrentMapCache ConcurrentMapCache
public ConcurrentMapCache(String name, ConcurrentMap<Object, Object> store, boolean allowNullValues)
From source file:org.icgc.dcc.metadata.server.config.CacheConfig.java
@Override public CacheManager cacheManager() { return new ConcurrentMapCacheManager() { @Override//from w ww .j a v a 2s . c o m protected Cache createConcurrentMapCache(String name) { return new ConcurrentMapCache(name, createStore(), false); } /** * @return Guava cache instance with a suitable TTL. */ private ConcurrentMap<Object, Object> createStore() { return CacheBuilder.newBuilder().expireAfterWrite(CACHE_TTL_MINUTES, MINUTES).maximumSize(100) .build().asMap(); } }; }