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

Poster screen caching bug ?

I'm running a Roku LT (firmware 4.0 - build 5060) and seeing some weird caching issues for poster images. I'm doing the standard cache busting (adding a query string parameter ... i.e. ?v=<some changing value>) yet the poster image is not being retrieved. I first validated the correct image was being returned via a browser. I then used Wireshark and verified that the request is not being made from the Roku.

... has anyone else seen this issue ?

-Doug

Here is the code ..


movieInfoArray = ParseJson(response)

dt = CreateObject("roDateTime")
tss = dt.AsSeconds().ToStr()

if movieInfoArray <> invalid

for i = 0 to (movieInfoArray.Count() - 1)

movieInfoArray[i].hdPosterURL = movieInfoArray[i].hdPosterURL + "?v=" + tss
movieInfoArray[i].sdPosterURL = movieInfoArray[i].sdPosterURL + "?v=" + tss

print "hdPosterURL = " + movieInfoArray[i].hdPosterURL
print "sdPosterURL = " + movieInfoArray[i].sdPosterURL

end for

screen.SetContentList(movieInfoArray)

end if
0 Kudos
4 REPLIES 4
destruk
Binge Watcher

Re: Poster screen caching bug ?

If there is an error in your json, then it would crash/return invalid which would use the prior url's which are cached.
In the debug console what shows up for the print statements you already have?
0 Kudos
dhoard
Visitor

Re: Poster screen caching bug ?

Agreed ... but no error parsing the JSON. The print statements show the correct URLs with the query string parameter, and the parameter changes each time i run the channel. I can change the image on the server, but the old image is still displayed.

Execution 1:

hdPosterURL = http://192.168.1.3:8989/roku/images/cat ... NtemhixkbN

Execution 2:

hdPosterURL = http://192.168.1.3:8989/roku/images/cat ... 2dvxKjqHMN

-Doug
0 Kudos
destruk
Binge Watcher

Re: Poster screen caching bug ?

If you change from json to xml does the problem go away?
0 Kudos
dhoard
Visitor

Re: Poster screen caching bug ?

Not sure on the XML (... and really don't want to switch my code / feeds to XML)

I have worked around the issue, but don't really understand why it didn't work, if it's a bug on my part or a bug in core Roku code. (All code compiled / executed)

The poster screen performs an HTTP request and shows an updated image if I modify the value in the roAssociativeArray this way ...


movieInfoArray[i].AddReplace("HDPosterUrl", movieInfoArray[i].HDPosterUrl + "?" + m.cacheBuster)

The poster screen shows an old cached image if I modify the value in the roAssociativeArray this way ...


movieInfoArray[i].HDPosterUrl = movieInfoArray[i].HDPosterUrl + "?" + m.cacheBuster
0 Kudos