Forum Discussion

YungBlood's avatar
YungBlood
Streaming Star
15 years ago

Cached image problem.

Hi,
I'm having a problem that I can't seem to figure out. I'm using roHtml to download an image, and save it to tmp:/. It downloads correctly the first time. Then I change the image on the web server. But when I exit my channel completely, and re-enter, I still get the same old image. I seem to have to reboot the roku box to force it to download the new image. The first solution I thought of is have my code delete the tmp:/file. Unfortunately, it's part of my contest entry, so I can't change the code.... 🙂

Any suggestions?
-Kevin

5 Replies

  • In addition, use a timestamp to ensure a unique instance everytime, such as:

    ts = GetUnixTime()
    "http://yourhost/image.jpg"+ "?v=" + itostr(ts)

    Store that image in cache, then pull it from there each time you're inside the app. Once you reenter, then you'll grab a fresh copy. This is pretty much required if you're updating images frequently.
  • That is happening to me also. The xml files I replace them with newer info and an upload them to S3 and the app keeps showing me the results of the previous one. Please what do I have to do to get this fixed ?
  • "ramon1604" wrote:
    That is happening to me also. The xml files I replace them with newer info and an upload them to S3 and the app keeps showing me the results of the previous one. Please what do I have to do to get this fixed ?

    The two posts immediately before yours explain how to get around the caching. Are you looking for some other answer?
  • jbrave's avatar
    jbrave
    Channel Surfer
    Also, you should consider having a flag file on your server that you set when you have updated the images, and have your app check and only add the "cache buster" when you update, no point in downloading new images every time your app loads.