diff --git a/code/data_cache.js b/code/data_cache.js index e6caf3b9..4002a937 100644 --- a/code/data_cache.js +++ b/code/data_cache.js @@ -2,15 +2,9 @@ // cache for map data tiles. window.DataCache = function() { - // stock site nemesis.dashboard.DataManager.CACHE_EXPIRY_MS_ = 18E4 - so should be 2 mins cache time - this.REQUEST_CACHE_FRESH_AGE = 120; // if younger than this, use data in the cache rather than fetching from the server + // stock site nemesis.dashboard.DataManager.CACHE_EXPIRY_MS_ = 18E4 - 3 minutes + this.REQUEST_CACHE_FRESH_AGE = 3*60; // if younger than this, use data in the cache rather than fetching from the server - // stale cache entries can be updated (that's what the optional 'timestampMs' field in getThinnedEntities is - // for, retrieving deltas) so use a long max age to take advantage of this - // however, there must be an overall limit on the maximum age of data from the servers, otherwise the deletedEntity - // entries would grow indefinitely. an hour seems reasonable from experience with the data, so 55 mins max cache time -// this.REQUEST_CACHE_MAX_AGE = 55*60; // maximum cache age. entries are deleted from the cache after this time -//UPDATE: this timestampMs parameter doesn't work, so reduced max age to limit RAM usage this.REQUEST_CACHE_MAX_AGE = 15*60; // maximum cache age. entries are deleted from the cache after this time if (L.Browser.mobile) {