Changeset 13643 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2018-04-16T23:00:30+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/layer
- Files:
-
- 2 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 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java
r13127 r13643 68 68 private void initCache() { 69 69 if (!cacheOff) { 70 try { 71 cache = JCSCacheManager.getCache("geoimage-thumbnails", 0, 120, 72 Config.getDirs().getCacheDirectory(true).getPath() + File.separator + "geoimage-thumbnails"); 73 } catch (IOException e) { 74 Logging.warn("Failed to initialize cache for geoimage-thumbnails"); 75 Logging.warn(e); 76 } 70 cache = JCSCacheManager.getCache("geoimage-thumbnails", 0, 120, 71 Config.getDirs().getCacheDirectory(true).getPath() + File.separator + "geoimage-thumbnails"); 77 72 } 78 73 }
Note:
See TracChangeset
for help on using the changeset viewer.