On 11/21/06, Chris Hostetter <[EMAIL PROTECTED]> wrote:
once upon a time Yonik and i discussed having a "maxAutoWarm" time option
on the caches, and they would give up if that much time had elapsed

At first I thought it would be easy... just autowarm until time is up.
But then I realized that there is a problem: one would want to warm
items from the most important to the least important if you don't know
if you are going to get to them all.  But doing them in that order
with an LRU cache means that they would end up in the wrong order (the
most recently used item would be at the tail of the list and first to
be ejected).

Even if we *did* have access to the internal list of the
LinkedHashMap, reversing the order isn't what is desired either since
generation of one cache entry can touch and thus promote another.
Perhaps the solution is to keep a separate list while warming, and
then when time runs out, clear and reinsert in the correct order.


-Yonik

Reply via email to