On Fri, 18 May 2001, James Strachan wrote:

> RE: [PROPOSAL] Cache project...Hi Rodney
> 
> Yes I think we're all on the same line here. 
> 
> I'm not yet sure from an API perspective how to deal with things like
> expiry, cost, possible dependencies and other such related attrbutes
> of a cache key yet. I need a bit of time to mull over your suggestion
> along with similar techniques in Turbine & Avalon (& the JCache JSR).
> 
> Lets think some more then shall we try propose some common interfaces?
> 

Just as a little food for thought, consider having a pluggable
"evict" method that is called when you need to remove an entry from the
cache.  We can offer the standard strategies you outlined, but users can
define their own as well.

The API for a cache object itself should include properties that are
commonly used in such eviction algorithms (last modified timestamp,
"cost" estimate, and so on).  However, an eviction strategy that is
application specific is going to be looking at the actual cached objects
anyway -- maybe we don't need any more than those few standard ones?

> James

Craig

Reply via email to