[Tilecache] Customize TileCache get image routine

Christopher Schmidt crschmidt at metacarta.com
Mon Oct 15 19:09:18 EDT 2007


On Mon, Oct 15, 2007 at 04:51:06PM -0600, Linda Rawson wrote:
> Thanks for the information.
> 
> *>>>>1.  Check if the image already exists in the cache.
> 
> >>>>>I believe this is handled by TileCache at the 'Service' level,
> depending
> >>>>>on what you mean by 'cache'.
> *
> Basically from the class MyDGLayer(Layer):
> 
> I only want to "question" the service if I don't have the image cached on my
> disk already.  

This is what TileCache does automatically. If you've already fetched the
image from the remote layer, then it will be in the cache, and TileCache
will never talk to your MyDGLayer, so you don't need to worry about it.
You *only* get asked to render a tile if it doesn't already exist. 

It's the same in the other direction: When you return from renderTile,
the tile is first written to disk, then returned to the user. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list