Daniel,

Just an observation - The BufferCache doesn't seem very LRU to me since it
doesn't do anything when an element is accessed. Have I missed something?

On a separate note, one feature I have added in the past to LRU caches is
to allow a lifetime to be associated with an entry. If an entry is accessed
after its lifetime has been exceeded, it is purged and it is not considered
to be in the collection. Also, if the cache fills up, expired elements are
purged first. It is part of my "nothing is forever" philosophy when
caching.

Conor

----- Original Message -----
From: "Daniel Rall" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 18, 2001 9:59 AM
Subject: [Collections] Turbine's BufferCache and SequencedHashtable


> What would people think about moving Turbine's LRU algorithm
> implementation into the Commons Collections?
>
>
<http://jakarta.apache.org/cvsweb/index.cgi/jakarta-turbine/src/java/org/ap
ache/turbine/util/BufferCache.java?rev=1.2&content-type=text/vnd.viewcvs-ma
rkup>
>
>
<http://jakarta.apache.org/cvsweb/index.cgi/jakarta-turbine/src/java/org/ap
ache/turbine/util/SequencedHashtable.java?rev=1.3&content-type=text/vnd.vie
wcvs-markup>
>
> Daniel
>

Reply via email to