https://bz.apache.org/bugzilla/show_bug.cgi?id=66524

--- Comment #2 from Steven Kearns <steven.kea...@servicenow.com> ---
The field CachedResource.nextCheck is what is being sorted, it is also a proxy
for lastUsedTime.

since items will be evicted in iteration order, then sorting by "reverse
nextCheck" makes the iteration order by descending nextCheck, or decreasing
lastUsedTime, which means most recent to least recent.  That is MRU, not LRU.

Of course most resource caches should be LRU, not MRU, because an item is more
likely to be accessed again if it has been accessed recently.  The hit ratio of
the cache will be much improved when it iterates in the correct order.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to