[Tilecache] Simple question about reading config

Mark Deneen mdeneen+tiles at saucontech.com
Mon Oct 5 22:58:10 EDT 2009


Jim,

Thanks for the tip.  I had found the Service.load, and saw how it pulled in everything.  All it took was a little inspecting.  I successfully added "X-SendFile" and "Expires" headers to the response for the wsgi handler.

Mark
----- "Jim Groffen" <jim.groffen at lisasoft.com> wrote:

> Hello Mark,
> 
> If you look at TileCache/Service.py all the configuration reading is
> done by the Service.load() method - look at the declaration for
> _load().
> 
> If you have any configuration to read it's best to have it happen
> during the Service.load() as TileCache does a good job of reading the
> config file and caching config in memory only when it needs to. For
> instance Service.load() is called by the various webapp handler
> methods in Service.py and where possible (ie based on which handler is
> being used) will only read the configuration if it hasn't been read
> before or it detects that the config file changed.
> 
> What you are doing would work but it bypasses the existing mechanism,
> so you've asked a good question :D
> 
> Regards,
> 
> Jim G



More information about the Tilecache mailing list