[Tilecache] tilecache refetch configuration
Pavel Iacovlev
iacovlev.pavel at gmail.com
Fri Jan 15 11:06:11 EST 2010
My knowledge of phyton is very limited but as I understood correctly
this is the line that checks file modification date:
cfgs = cfgs + (configFile,)
try:
cfgTime = os.stat(configFile)[8]
fileChanged = lastRead[configFile] < cfgTime
except:
pass
I see the code, but I don't get this behavior. I test it like this:
1. Make a WMS request to tilecache
2. Get image as a result
3. Change the layer configuration to an invalid WMS URL, or in general
make the config file invalid by adding random text
4. Make the same WMS request
5. And as a result I still get the image, until I reload apache
Here is my apache configuration of mod_python maybe it will help:
<Directory /home/ue/Projects/yagis-dev/public/tilecache/>
# AddHandler cgi-script .cgi
# Options +ExecCGI
AddHandler python-program .py
PythonHandler TileCache.Service
PythonPath "['/home/ue/Projects/yagis-dev/public/tilecache/'] + sys.path"
PythonOption TileCacheConfig /home/ue/Projects/yagis-dev/configs/tilecache.cfg
</Directory>
On Fri, Jan 15, 2010 at 5:15 PM, Frederic Junod
<frederic.junod at camptocamp.com> wrote:
> Hi,
>
> This job is already done, see:
> http://svn.tilecache.org/trunk/tilecache/TileCache/Service.py (function handler)
>
> The config file is reloaded if needed (based on the file modification date)
>
> fredj
>
> On Fri, Jan 15, 2010 at 3:30 PM, Pavel Iacovlev
> <iacovlev.pavel at gmail.com> wrote:
>> I am using tilecache through apache + mod_python and as I understood
>> correctly tilecache loads the tilecache.cfg into the memory to improve
>> performance. So to reload the configuration I need to restart apache.
>>
>> My question: Is there a way to tell tilecache to reload it's
>> configuration file without reloading apache ? In my case the
>> configuration file is created by a 3rd party app and it be nice to
>> call some "script" that tell tilecache to reload it's configuration
>> files.
>>
>> --
>> http://iap.md, The future is open
>> _______________________________________________
>> Tilecache mailing list
>> Tilecache at openlayers.org
>> http://openlayers.org/mailman/listinfo/tilecache
>>
>
>
>
> --
> Frédéric Junod
> Camptocamp SA
>
--
http://iap.md, The future is open
More information about the Tilecache
mailing list