473,802 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2393
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
1698
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 www.domain.com/1234 or www.domain.com/1234.htm instead. This way the browser will cache the page. I have two concerns: 1) Is this possible without rewriting the url? If so how? 2) The result page will be different for different users. Will this...
4
1146
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 argument" at that same line 25. What ever I did does not help, I have closed the program, I restarted my computer, I changed the page to contain very simple html script with no js the error is still there on line 25. I deleted all lines living...
28
3455
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 is too good. When I revisit the page or refresh the page, and then redo the script insertion, the browser doesn't even hit the server to check for a newer version of the JavaScript file. The same old script runs with each insertion.
8
1588
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, etc.), but I would like to know how to create web pages without these. If I have mod_python or fastcgi on apache, where do I start? I don't have clue where to begin to create a web page from scratch in python. I am sure I will want to access...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10536
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9114
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.