List of usage examples for org.apache.commons.jcs.engine CompositeCacheAttributes setMemoryCacheName
@Override public void setMemoryCacheName(String s)
From source file:org.openstreetmap.josm.plugins.openstreetcam.cache.CacheManager.java
private CacheManager() { final String pluginLocation = new File(Preferences.main().getPluginsDirectory(), GuiConfig.getInstance().getPluginShortName()).getPath(); final CacheSettings settings = PreferenceManager.getInstance().loadPreferenceSettings().getCacheSettings(); this.cache = JCSCacheManager.getCache(CACHE_NAME, settings.getMemoryCount(), settings.getDiskCount(), pluginLocation + CACHE_LOCATION); final CompositeCacheAttributes attr = (CompositeCacheAttributes) this.cache.getCacheAttributes(); attr.setDiskUsagePattern(DiskUsagePattern.SWAP); attr.setMemoryCacheName(MEMORY_MANAGER); attr.setUseMemoryShrinker(true);//from w w w . ja v a2s .co m this.cache.setCacheAttributes(attr); this.cache.clear(); }