The box automatically maintains a system wide LRU image cache.... In general, there is no user or developer control over this cache.
However, in order to speed up navigation between different springboards using the left and right arrows, we did add a PrefetchPoster() method to the roSpringboard class. The LoadSpringboardContent() function can be used in the context of the showSpringboardScreenWithNav() function that was part of the
"Make your Springboard Screens Navigate to Next Item in Feed" post.
You would use the PrefetchPoster() method like so:
'*************************************************************
'** LoadSpringboardContent()
'*************************************************************
Function LoadSpringboardContent(screen as object, items as object, index as integer)
item = items[index]
if item <> invalid and type(item) = "roAssociativeArray" and screen <> invalid and type(screen)= "roSpringboardScreen" then
screen.AllowUpdates(false)
screen.SetDescriptionStyle("video") 'audio, movie, video, generic
' generic+episode=4x3, generic+audio=audio
screen.ClearButtons()
screen.AddButton(1,"Play")
screen.AddRatingButton(2,80,20)
screen.AddButton(3,"Go Back")
screen.SetStaticRatingEnabled(false)
screen.AllowUpdates(true)
screen.SetContent(item)
screen.Show()
leftPrefetchIndex = 0
if index > 0 then
leftPrefetchIndex = index - 1
elseif items.Count() > 0
leftPrefetchIndex = (items.Count() - 1)
endif
rightPrefetchIndex = 0
if index < (items.Count() - 1) then
rightPrefetchIndex = index + 1
elseif (items.Count() - 1) = index
rightPrefetchIndex = 0
endif
item = items[leftPrefetchIndex]
if item <> invalid and item.SDPosterUrl <> invalid and item.HDPosterUrl <> invalid then
screen.PrefetchPoster(item.SDPosterUrl, item.HDPosterUrl)
endif
item = items[rightPrefetchIndex]
if item <> invalid and item.SDPosterUrl <> invalid and item.HDPosterUrl <> invalid then
screen.PrefetchPoster(item.SDPosterUrl, item.HDPosterUrl)
endif
endif
End Function
BTW, the roPosterScreen does prefetching of images internally in the object.