Forum Discussion

dhoard's avatar
dhoard
Visitor
13 years ago

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

4 Replies

  • destruk's avatar
    destruk
    Streaming Star
    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?
  • destruk's avatar
    destruk
    Streaming Star
    If you change from json to xml does the problem go away?
  • 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