Results 1 to 4 of 4

Thread: Caching Issue

  1. #1
    Join Date
    Jun 2005
    Posts
    760

    Default Caching Issue

    The following code works once in a G4 event script... but never again:
    Code:
    local url = "http://www.ssec.wisc.edu/localweather/ww.gif"
    NetRemote.SetImageURL ("Warnings", url)
    Marcel was kind enough to explain that Girder loads a cached copy from the local explorer cache on subsequent calls to the script, which is why the image will never update. Is there a way to force G4 to ignore the cache and actually go to the url and update the image? Alternatively, can someone suggest a work-around?

  2. #2
    Join Date
    Nov 2003
    Location
    Hove, E Sussex, UK
    Posts
    4,005

    Default

    Quote Originally Posted by dsmes
    The following code works once in a G4 event script... but never again:
    Code:
    local url = "http://www.ssec.wisc.edu/localweather/ww.gif"
    NetRemote.SetImageURL ("Warnings", url)
    Marcel was kind enough to explain that Girder loads a cached copy from the local explorer cache on subsequent calls to the script, which is why the image will never update. Is there a way to force G4 to ignore the cache and actually go to the url and update the image? Alternatively, can someone suggest a work-around?
    try

    Code:
    NetRemote.SendImageFromURL("Warnings", url)
    Thx, Dan

    Onwards and Upwards!
    http://www.danward.co.uk

  3. #3
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    2,140

    Default

    try :

    local url ="http://www.ssec.wisc.edu/localweather/ww.gif?yyy="..os.time().."&xxx=.gif";
    NetRemote.SetImageURL ("Warnings",url);


    Marcel

  4. #4
    Join Date
    Jun 2005
    Posts
    760

    Default

    Thanks Marcel. I didn't know you could universally apply your os.time() trick to any url. Now I do, and it works great!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •