Open hampelm opened 10 years ago
We're ignoring the query string when we save to S3 and when we check the S3 cache.
If we keep storing the full JSONP, then we need to use the query string in the filename. The situation above will become a cache miss, though. We also want to serve gzip'd data when appropriate (#71), which would require saving two copies of the data to S3. Instead, we could save just the JSON data to S3 and then send to the client through the tile server, adding JSONP wrappers and gzip'ing as appropriate.
It's not clear to me why the tiles work again in step 6. Timing? Something about how the callbacks are generated?
The UTFGrid plugin doesn't reuse callback IDs in the same document. It sounds like we could end up alternating between lu1 and lu2 for each tile as we refresh the data, assuming the old one gets removed from the window. https://github.com/danzel/Leaflet.utfgrid/blob/master/src/leaflet.utfgrid.js#L57
Should we disable grid caching for now?
There's a weird inconsistent tile caching bug. Steps to reproduce:
Uncaught ReferenceError: lu1 is not defined
4: Delete tiles in S3.
5: Refresh survey. Grids load and are functional (again, not served from cache)
6: Refresh survey again. Grids load from cache and are functional.
(7: Add results, click refresh, error appears)