urllib, caching

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AndrewJ

    #1

    urllib, caching

    I've got code:

    f= urllib.urlopen( "http://www.stuff/nb5.php") ;

    This connects to a page that changes in real time. Works ok, and
    retrieves the data the first time.

    But then any subsequent calls all return the same data, even though the
    web page itself has changed.

    Is there caching going on here? How do I turn it off ?

  • Steve Holden

    #2
    Re: urllib, caching

    AndrewJ wrote:[color=blue]
    > I've got code:
    >
    > f= urllib.urlopen( "http://www.stuff/nb5.php") ;
    >
    > This connects to a page that changes in real time. Works ok, and
    > retrieves the data the first time.
    >
    > But then any subsequent calls all return the same data, even though the
    > web page itself has changed.
    >
    > Is there caching going on here? How do I turn it off ?
    >[/color]
    You can call urllib.urlclean up() to clear the cache.

    regards
    Steve
    --
    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC www.holdenweb.com
    PyCon TX 2006 www.python.org/pycon/

    Comment

    Working...