Very strange caching problem with python script run from apache

T

tinnews

I'm running a python script via the apache ExtFilterDefine directive,
it works basically as expected *except* that when I change the script
apache/firefox continue to run the old version of the python script
until I remove the script completely and then replace it.

I.e. my script is called tl2html.py, if I change it to (say) add
several lines of output the added lines don't appear on firefox.
I can restart firefox and I can restart apache and *still* it runs the
old version of tl2html.py. If I 'mv tl2html.py fred' and then
redisplay the page I get an error (because the script isn't there) and
if I then 'mv fred tl2html.py' the new version of the script is run
and I get my expected extra lines.

This makes dubugging/development *exceedingly* difficult!

Where is this python being cached?
 
T

tinnews

I'm running a python script via the apache ExtFilterDefine directive,
it works basically as expected *except* that when I change the script
apache/firefox continue to run the old version of the python script
until I remove the script completely and then replace it.

I.e. my script is called tl2html.py, if I change it to (say) add
several lines of output the added lines don't appear on firefox.
I can restart firefox and I can restart apache and *still* it runs the
old version of tl2html.py. If I 'mv tl2html.py fred' and then
redisplay the page I get an error (because the script isn't there) and
if I then 'mv fred tl2html.py' the new version of the script is run
and I get my expected extra lines.

This makes dubugging/development *exceedingly* difficult!

Where is this python being cached?
It's OK, I have found the problem, it's Firefox's cache.

Since the file/URL *doesn't* change when I change the filter
(tl2html.py) Firefox simply redisplays its cached copy of the page. It
makes no difference if you restart Firefox or restart apache the cache
is still there and Firefox will use it.

Simple workaround is to hold Shift down when reloading the page, this
forces Firefox to get a new copy even if it thinks it hasn't changed.

Phew, that took a long time to work out! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top