473,385 Members | 1,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 2369
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.