- Timestamp:
- 2015-04-06T23:16:50+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
r8168 r8172 15 15 import org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache; 16 16 import org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes; 17 import org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache Manager;17 import org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory; 18 18 import org.apache.commons.jcs.engine.CompositeCacheAttributes; 19 19 import org.apache.commons.jcs.engine.behavior.ICompositeCacheAttributes.DiskUsagePattern; … … 28 28 /** 29 29 * @author Wiktor Niesiobędzki 30 * 30 * 31 31 * Wrapper class for JCS Cache. Sets some sane environment and returns instances of cache objects. 32 32 * Static configuration for now assumes some small LRU cache in memory and larger LRU cache on disk … … 39 39 private static long maxObjectTTL = Long.MAX_VALUE; 40 40 private final static String PREFERENCE_PREFIX = "jcs.cache"; 41 private final static IndexedDiskCacheFactory diskCacheFactory = new IndexedDiskCacheFactory(); 41 42 42 43 /** … … 141 142 IndexedDiskCacheAttributes diskAttributes = getDiskCacheAttributes(maxDiskObjects, cachePath); 142 143 diskAttributes.setCacheName(cacheName); 143 IndexedDiskCache<K, V> diskCache = IndexedDiskCacheManager.getInstance(null, null, new StandardSerializer()).getCache(diskAttributes); 144 IndexedDiskCache<K, V> diskCache = diskCacheFactory.createCache(diskAttributes, cacheManager, null, new StandardSerializer()); 145 144 146 cc.setAuxCaches(new AuxiliaryCache[]{diskCache}); 145 147 }
Note:
See TracChangeset
for help on using the changeset viewer.