Changeset 13119 in josm


Ignore:
Timestamp:
2017-11-12T21:14:52+01:00 (7 years ago)
Author:
Don-vip
Message:

fix #15545 - add new property wmts.capabilities.cache.max_age to configure the delay (in seconds) after which WMTS capabilities are considered stale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r12709 r13119  
    5656import org.openstreetmap.josm.gui.layer.NativeScaleLayer.ScaleList;
    5757import org.openstreetmap.josm.io.CachedFile;
     58import org.openstreetmap.josm.spi.preferences.Config;
    5859import org.openstreetmap.josm.tools.CheckParameterUtil;
    5960import org.openstreetmap.josm.tools.GBC;
     
    358359    private Collection<Layer> getCapabilities() throws IOException {
    359360        try (CachedFile cf = new CachedFile(baseUrl); InputStream in = cf.setHttpHeaders(headers).
    360                 setMaxAge(7 * CachedFile.DAYS).
     361                setMaxAge(Config.getPref().getLong("wmts.capabilities.cache.max_age", 7 * CachedFile.DAYS)).
    361362                setCachingStrategy(CachedFile.CachingStrategy.IfModifiedSince).
    362363                getInputStream()) {
Note: See TracChangeset for help on using the changeset viewer.