Very strange caching problem with python script run from apache

Discussion in 'Python' started by tinnews@isbd.co.uk, Dec 28, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

  2. Guest

    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, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brewman
    Replies:
    0
    Views:
    1,433
    brewman
    Aug 28, 2003
  2. Raymond Arthur St. Marie II of III

    very Very VERY dumb Question About The new Set( ) 's

    Raymond Arthur St. Marie II of III, Jul 23, 2003, in forum: Python
    Replies:
    4
    Views:
    452
    Raymond Hettinger
    Jul 27, 2003
  3. Kenneth McDonald

    Very, very strange problem with properties

    Kenneth McDonald, May 4, 2004, in forum: Python
    Replies:
    2
    Views:
    254
    Kenneth McDonald
    May 4, 2004
  4. shanx__=|;-

    very very very long integer

    shanx__=|;-, Oct 16, 2004, in forum: C Programming
    Replies:
    19
    Views:
    1,594
    Merrill & Michele
    Oct 19, 2004
  5. Abhishek Jha

    very very very long integer

    Abhishek Jha, Oct 16, 2004, in forum: C Programming
    Replies:
    4
    Views:
    409
    jacob navia
    Oct 17, 2004
Loading...

Share This Page