On Sat, Aug 04, 2001 at 09:17:21AM -0700, brian moseley wrote:

> could this be because i'm only ever doing one set, at
> session creation time? since i'm using a memory cache, i
> didn't expect to have to call set every time i modify the
> cached data.

Yup.  That would be it.  Please see my response to my next post (the
one in which you mention solving the problem).


> also i didn't know that Storable was used underneath. why is
> this necessary?

To quote Jimi Williams, "manager's decision."  I decided to optimize
for the more common scenario in which one is pulling objects out of
the cache and modifying them.  Rather than force the user to manually
clone the retrieved object, I figured that it was better to do the
clone up front and require the user to store the object again if they
modify it.  This is to preserve consistent semantics and behavior
across the various cache implementations.  I.e., what works for
MemoryCache should work for the SharedMemoryCache or the FileCache as
well.

That's not to say one couldn't subclass MemoryCache to have the
alternate behavior you propose...

-DeWitt



Reply via email to