Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Very strange caching problem with python script run from apache

Reply
Thread Tools

Very strange caching problem with python script run from apache

 
 
tinnews@isbd.co.uk
Guest
Posts: n/a
 
      12-28-2007
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?

--
Chris Green
 
Reply With Quote
 
 
 
 
tinnews@isbd.co.uk
Guest
Posts: n/a
 
      12-29-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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!

--
Chris Green
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
very very very long integer shanx__=|;- C Programming 19 10-19-2004 03:55 PM
Very, very strange problem with properties Kenneth McDonald Python 2 05-04-2004 04:19 AM
Quick Book file access very very very slow Thomas Reed Computer Support 7 04-09-2004 08:09 PM
Re: very very strange C++ NaN or memory management related problem brewman C++ 0 08-28-2003 10:35 PM
very Very VERY dumb Question About The new Set( ) 's Raymond Arthur St. Marie II of III Python 4 07-27-2003 12:09 AM



Advertisments