[Tilecache] Config file priority with mod_python
Sylvain Pasche
sylvain.pasche at camptocamp.com
Thu May 15 15:50:08 EDT 2008
Hi,
I've got a Tilecache service configured with mod_python, with an Apache
config looking like:
<Location /tilecache/myproject>
AddHandler python-program .py
PythonHandler TileCache.Service
PythonOption TileCacheConfig /path/to/tilecache.cfg
</Location>
The base parameter of the cache section isn't taken into account.
[cache]
type=DiskCache
base=/var/tmp/
Tiles are always saved in /tmp, which is the configration from
/etc/tilecache.cfg.
Shouldn't the tilecache configuration file set from the TileCacheConfig
Apache parameter should take precedence over the one from /etc?
With the following patch applied, I'm getting the expected result.
root at server:/usr/share/python-support/tilecache/TileCache# diff -u
Service.py.orig Service.py
--- Service.py.orig 2008-05-15 21:30:15.000000000 +0200
+++ Service.py 2008-05-15 21:33:28.000000000 +0200
@@ -306,7 +306,7 @@
cfgs = cfgfiles
cfgTime = None
if options.has_key("TileCacheConfig"):
- cfgs = (options["TileCacheConfig"],) + cfgs
+ cfgs = cfgs + (options["TileCacheConfig"],)
try:
cfgTime = os.stat(options['TileCacheConfig'])[8]
except:
More information about the Tilecache
mailing list