List of usage examples for org.apache.commons.jcs.engine.control CompositeCache getAuxCaches
public AuxiliaryCache<K, V>[] getAuxCaches()
From source file:org.openstreetmap.josm.data.cache.JCSCacheManager.java
@SuppressWarnings("unchecked") private static <K, V> CacheAccess<K, V> getCacheInner(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) throws IOException { CompositeCache<K, V> cc = cacheManager.getCache(cacheName, getCacheAttributes(maxMemoryObjects)); if (cachePath != null && cacheDirLock != null) { IDiskCacheAttributes diskAttributes = getDiskCacheAttributes(maxDiskObjects, cachePath, cacheName); try {/*from ww w. ja v a2 s. co m*/ if (cc.getAuxCaches().length == 0) { cc.setAuxCaches(new AuxiliaryCache[] { DISK_CACHE_FACTORY.createCache(diskAttributes, cacheManager, null, new StandardSerializer()) }); } } catch (IOException e) { throw e; } catch (Exception e) { // NOPMD throw new IOException(e); } } return new CacheAccess<>(cc); }