use of com.github.benmanes.caffeine.jcache.CacheManagerImpl in project caffeine by ben-manes.
the class CaffeineCachingProvider method getCacheManager.
@Override
public CacheManager getCacheManager(URI uri, ClassLoader classLoader, Properties properties) {
URI managerURI = getManagerUri(uri);
ClassLoader managerClassLoader = getManagerClassLoader(classLoader);
synchronized (cacheManagers) {
Map<URI, CacheManager> cacheManagersByURI = cacheManagers.computeIfAbsent(managerClassLoader, any -> new HashMap<>());
return cacheManagersByURI.computeIfAbsent(managerURI, any -> {
Properties managerProperties = (properties == null) ? getDefaultProperties() : properties;
return new CacheManagerImpl(this, managerURI, managerClassLoader, managerProperties);
});
}
}
Aggregations