My recent reading of Google collections makes me think that the right way to
do a cache is with their MapMaker and computableHash method.  Very nicely
done.

On Sun, Sep 6, 2009 at 11:55 PM, Sean Owen <sro...@gmail.com> wrote:

> My pet theory about caches is the caller should only need one
> operation -- get(K key). The cache is instantiated with an object that
> can load a value for a key. Given that it can do all its work.
> Otherwise every caller has to have knowledge about how to manage the
> cache and how to load values for keys. I am not sure, maybe this is
> partly what you are getting at, in which case this approach solves
> some of those issues?
>



-- 
Ted Dunning, CTO
DeepDyve

Reply via email to