Forum Discussion
EnTerr
11 years agoRoku Guru
"RokuMarkn" wrote:
However EnTerr, I, like dhoard, read your comments to imply that you thought otherwise. So I guess we're both wondering now, what you meant when you said that his loop was unnecessary?
See above. Keep MRU list of keys:
- read from registry on start
- on new content, `mruList.push(newKey)`
- before reg.flush(), expire oldies and store mruList
for _ = 1 to mruList.count() - N
reg.delete(mruList.shift())
end for
reg.write("MRU", toJSON(mruList))
PS. replaced formatJSON() with toJSON() call to actually make this work