From c776a07fd6b8fb1a9ba2da69e02658714249efd8 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sat, 15 Jun 2013 17:08:59 +0100 Subject: [PATCH] decrease standard refresh time to 30 seconds, so chat is more up to date increase map tile cache to 2 minutes, so the increased refresh for chat does not impact map data tile requests --- code/map_data.js | 4 ++-- main.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/map_data.js b/code/map_data.js index 2f4f25a1..dff86653 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -9,8 +9,8 @@ window._requestCache = {} // cache entries older than the fresh age, and younger than the max age, are stale. they're used in the case of an error from the server -window.REQUEST_CACHE_FRESH_AGE = window.REFRESH; // if younger than this, use data in the cache rather than fetching from the server -window.REQUEST_CACHE_MAX_AGE = 5*window.REFRESH; // maximum cache age. entries are deleted from the cache after this time +window.REQUEST_CACHE_FRESH_AGE = 2*60; // if younger than this, use data in the cache rather than fetching from the server +window.REQUEST_CACHE_MAX_AGE = 15*60; // maximum cache age. entries are deleted from the cache after this time window.storeDataCache = function(qk,data) { var d = new Date(); diff --git a/main.js b/main.js index 47e9022f..4db68a51 100644 --- a/main.js +++ b/main.js @@ -114,7 +114,7 @@ function wrapper() { L_PREFER_CANVAS = false; // CONFIG OPTIONS //////////////////////////////////////////////////// -window.REFRESH = 60; // refresh view every 60s (base time) +window.REFRESH = 30; // refresh view every 30s (base time) window.ZOOM_LEVEL_ADJ = 5; // add 5 seconds per zoom level window.ON_MOVE_REFRESH = 1.25; //refresh time to use after a movement event window.MINIMUM_OVERRIDE_REFRESH = 5; //limit on refresh time since previous refresh, limiting repeated move refresh rate