Cache project would be a nice addition. I like many of the suggests that
have been mentioned so far, especialy missed objects and JMX support which
would give the ability to monitor and optimize the cache settings. Making
the cache pluggable and flexible is also key, so the user has control of
purge algorithms, backing collection type and so forth.
My own cache implementation is pretty simple, it is backed by a Hashmap or
Very Fast Cache, plus has several purge properties which are min and max
times, soft and hard limit, purge size, plus access weight that is a setting
that determines how much weight is given to recently accessed objects while
calculating a rating for least frequently used object. With those five
properties, it is easy to fine tune each cache for optimal performance and
memory use.
As far as a backing collection goes, you may find the following of interest
for caches that are very read heavy and need to be thread safe.
Very Fast Cache. Throughput and speed are optimized at the cost of taking up
memory to maintain two maps. VFC uses a generational strategy, immutability,
and a one line sync block to guarantee thread safety and image integrity .
There are two images at all times: the immutable and the mutable image. All
updates are performed to the mutable image. Periodically, a copy of this
image is made and this copy becomes the new reference for the immutable.
http://engineering.acctiva.org/vfc
-david