472,973 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

Very strange caching problem with python script run from apache

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
Dec 28 '07 #1
1 2350
ti*****@isbd.co.uk 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
Dec 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Shabam | last post by:
I need to implement a caching mechanism for my script URLs. Instead of www.domain.com/script.cgi?id=1234 , which the browser will obviously not cache, I want the URL to be something like...
4
by: Efy | last post by:
Hi, I was debugging my JavaScript in VS2005, the script probably had an error some ware (Line 25), after I fixed the error, I am trying to run the page again I am getting the same error "Illegal...
28
by: Peter Michaux | last post by:
Hi, I'm playing with dynamic script insertion to make a request to the server for a JavaScript file to be automatically run when it arrives in the browser. It works but... The page caching...
8
by: jmDesktop | last post by:
I have been to the main python site, but am still confused. I have been using .net, so it may be obvious how to do this to everyone else. I am aware there are various frameworks (Django, Pylons,...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.