openlayers/openlayers — Issue #182: Better caching support for async tile images
Author: fbuchinger
Created: 2012-01-27 09:14:34+00:00
State: open

I'm using a sub-classed Layer.Grid with an overwritten `getUrlAsync()` method to integrate our proprietary single-tile map service to OpenLayers. The map service generates all tiles on the fly, so we are eager to prevent any unnecessary `/GetMap` requests. All map parameters are encoded in the service url, so the requests should be cacheable.

Unfortunately, the following problems occur from time to time:
1. After a tile has been served, an identical `/GetMap` request is triggered
2. While the `/GetMap` request for tile 1 is processed on the server, an identical request is triggered

While problem 1 is easily solved by introducing a cache dict on the layer object (request urls --> tile images), problem 2 is harder to tackle, since I need to postpone the getUrlAsync processing of request 2 until the response for the identical request 1 has arrived.

Are there any plans to add better caching support for the async scenario?