From f57d429b42ac8ee60ff27308a9ff37a72ec0d7c7 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Fri, 21 Feb 2014 07:30:40 +0000 Subject: [PATCH] cache expiry time was 2 mins, but default intel site uses 3 minutes - mis-read their timer value --- code/data_cache.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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) {