FindMyFeet/Find-My-Feet — Issue #8: Caching: user consent a size limits
Author: Spacerat
Created: 2011-10-18 22:47:47+00:00
State: open

Two important things concerning the caching:
##Size limits##
Some (all?) browsers have possibly varying size limits. I think we need to limit the zoom levels we cache, and there are two approaches to this:
1. Having looked at the API, I've realised it's actually possible for javascript to request that the cache for a particular page be refreshed, so *if it's possible* to get a list of currently visible images from the OpenLayers map, we could feasibly have a "cache this map" button which just caches the minimal amount of data required to show a particular map zoom level. This obviously means that we only cache one zoom level per route.
2. A dynamically generated link to a page with **&cache=true&zoom=14** (or something) could achieve this too, and might even be the easiest option.
3. The function which generates a list of images to cache could just be more restrictive with the zoom levels it picks. This might be easier to implement and still allows the caching of multiple zoom levels if done well.
4. Simply allow the caching to fail for requests for long distance travels. Not ideal

##User consent##
Users might not want caching at all. For options 1/2 above, the button solves this problem. For options 2/3, some kind of site-wide setting could be used (or, still a cache-this-page button).

What do you think of these ideas? Caching a single zoom level would be nice and solve the size issue but then, of course, users wouldn't be able to zoom around their cached maps.