Mainguy, Mike wrote:

On this subject, most of the material I see on this topic deals with
retrieving and storing info that is expensive to get somewhere else.  Most
of the solutions, however, also assume that it is acceptable that the object
be removed from cache for whatever reason (time expired, memory low,
whatever).  It seems, however, that it is assumed the developer will code in
a defensive manner such that, if the object has been removed from cache,
they will recreate the object and put it back in there.  Is this the way
commons-cache is supposed to work?

I think that's the way most caching systems work. The cache is passive and doesn't refresh objects on its own.


I personally would rather have a caching mechanism that is transparent and I
can have the objects be managed more hands off with a simple interface that
tells the cache manager how to refresh the data on them.  In my vision, I
would create an instance of an object and I would add it to the cache
manager.  After that, I would retrieve the object from the cache manager and
it I will automatically get a copy that was refreshed at the proper
interval.  (e.g. every 15 minutes).

I see this object manager as a layer above the caching system.

Emmanuel



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to