Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
YungBlood
Streaming Star

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
YungBlood

Bringing more fun to Roku!
0 Kudos
5 REPLIES 5
RokuKevin
Visitor

Re: Cached image problem.

Assuming you mean roUrlTransfer or ifHttpAgent....

You might want to try adding a "cache busting" uniquifying parameter to your urls that your server ignores.

Example:

"http://yourhost/image.jpg?a=1"
"http://yourhost/image.jpg?a=2"
...


--Kevin
0 Kudos

Re: Cached image problem.

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.
--
Float Left Interactive Team
www.floatleftinteractive.com
0 Kudos
ramon1604
Visitor

Re: Cached image problem.

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 ?
0 Kudos
TheEndless
Channel Surfer

Re: Cached image problem.

"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?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: Cached image problem.

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.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos