Greetings,
I have the following situation:
Layer goes to the web (potentially multiple sources) and draws the results on a layer. If all web requests complete without error, I would like to cache the tile so that next time no web requests are necessary. If an error occurs in a single request, I would like to display the layer as it is drawn, but don't want to cache the tile. On all further views of the tile, the cached tile is used if it exists.
Currently, I use a LayerOverlay and just set the TileCache directory. This is fine unless there is an error with one of the web requests... it caches the layer which may be incomplete (due to error connecting to source). I feel like the caching logic needs to be in the layer itself since it knows if there was an error.
Anyhow, I wanted to make sure I was on the right track and to see if you had any example of doing this?
Thanks,
.Ryan.