Changeset 13643 in josm for trunk/src/org/openstreetmap/josm/gui/layer/AbstractCachedTileSourceLayer.java
- Timestamp:
- 2018-04-16T23:00:30+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractCachedTileSourceLayer.java
r12620 r13643 2 2 package org.openstreetmap.josm.gui.layer; 3 3 4 import java.io.IOException;5 4 import java.util.Map; 6 5 import java.util.concurrent.ConcurrentHashMap; … … 16 15 import org.openstreetmap.josm.data.imagery.TileLoaderFactory; 17 16 import org.openstreetmap.josm.data.preferences.IntegerProperty; 18 import org.openstreetmap.josm.tools.Logging;19 17 20 18 /** … … 84 82 return cache; 85 83 } 86 try { 87 cache = JCSCacheManager.getCache(getCacheName(), 88 0, 89 getDiskCacheSize(), 90 CachedTileLoaderFactory.PROP_TILECACHE_DIR.get()); 91 return cache; 92 } catch (IOException e) { 93 Logging.warn(e); 94 return null; 95 } 84 cache = JCSCacheManager.getCache(getCacheName(), 85 0, 86 getDiskCacheSize(), 87 CachedTileLoaderFactory.PROP_TILECACHE_DIR.get()); 88 return cache; 96 89 } 97 90 … … 125 118 */ 126 119 public static CacheAccess<String, BufferedImageCacheEntry> getCache(String name) { 127 try { 128 return JCSCacheManager.getCache(name, 129 0, 130 MAX_DISK_CACHE_SIZE.get() * 1024, // MAX_DISK_CACHE_SIZE is in MB, needs to by in sync with getDiskCacheSize 131 CachedTileLoaderFactory.PROP_TILECACHE_DIR.get()); 132 } catch (IOException e) { 133 Logging.warn(e); 134 return null; 135 } 120 return JCSCacheManager.getCache(name, 121 0, 122 MAX_DISK_CACHE_SIZE.get() * 1024, // MAX_DISK_CACHE_SIZE is in MB, needs to by in sync with getDiskCacheSize 123 CachedTileLoaderFactory.PROP_TILECACHE_DIR.get()); 136 124 } 137 125
Note:
See TracChangeset
for help on using the changeset viewer.