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: 
czarquon
Visitor

roImageCanvas PurgeCachedImages - does it work

Has anyone used and gotten the roImageCanvas.PurgeCachedImages to work. If so what was the case.

I'm trying to access a CAM which needs refreshing at the same url over time. I've seen others have had a similar problem. I found that roImageCanvas had a method PurgeCachedImages but was not able to get it to work as I thought it would. To purge the image retrieved by a url and updating the image using the same url.

I tried a number of possible workarounds using roParagraph and roImageCanvas by closing the component and recreating it every time I need to refresh the url image.

while true
create component
while true
wait for message
exit while when needed
end while
end while

This failed even when I used roImageCanvas.PurgeCachedImages.

I did find a work around using roSlideShow. Apparently the above code works with one slide as the CAM's url.

Has anyone found a better way of purging roku cache.
0 Kudos
2 REPLIES 2
jbrave
Channel Surfer

Re: roImageCanvas PurgeCachedImages - does it work

Generrally, just tag a random number onto the end of your URL, like:

"http://www.myserver.com/image.jpg?r="+rnd(3000).tostr()

should force a new image download.

then perhaps run the purge function ever few minutes.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
czarquon
Visitor

Re: roImageCanvas PurgeCachedImages - does it work

Thanks - didn't occur to me that the server would ignore an extra parameter.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.