From 2f7635a175c9fdc7931140a03728f773bbdb7625 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sun, 9 Mar 2014 05:53:53 +0000 Subject: [PATCH] comment converning cache-related optimisation that might be added --- code/map_data_request.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/map_data_request.js b/code/map_data_request.js index e2f5008c..dddfe568 100644 --- a/code/map_data_request.js +++ b/code/map_data_request.js @@ -245,6 +245,10 @@ window.MapDataRequest.prototype.refresh = function() { this.debugTiles.create(tile_id,[[latSouth,lngWest],[latNorth,lngEast]]); +//TODO: with recent backend changes there are now multiple zoom levels of data that is identical except perhaps for some +// reduction of detail when zoomed out. to take good advantage of the cache, a check for cached data at a closer zoom +// but otherwise the same parameters (min portal level, tiles per edge) will mean less downloads when zooming out + if (this.cache && this.cache.isFresh(tile_id) ) { // data is fresh in the cache - just render it this.debugTiles.setState(tile_id, 'cache-fresh');