> I see. So the sideeffect of the setup:
> 
> C1 and C2 has O1
> RCS does not have O1
> C3 asks for O1
> 
> is that since O1 is not in C3 or RCS, it is loaded by C3, 
> replicated by 
> RCS, and invalidated in C1 and C2, even though they might be 
> up-to-date 
> objects (but RCS doesn't know).

Correct.

> I just see now, that one can't set a memory limit for the 
> cache, only a 
> limit for the number of cached objects. So what happens, if 
> there is not 
> enough memory?

In the SoftReference model, for example, each soft cache item gets
automatically deleted by the GC when (or before to be precise) there is not
enough memory.  Each such deleted item will be placed on to a reference
queue by the GC.  RCS just needs to release all resources (locally) in
relation to the cache items.  It doesn't need to invalidate the cache items
on the client caches.  It doesn't matter even if some client caches may
still have a copies of the deleted items, as the next change/load of a cache
item on a client cache will initiate the cycle of sychronizing of the latest
copy to both RCS and other client caches all over again.

> 
> Another question: do I undestand correctly that the lateral 
> cache lacks 
> the invalidate-message sending of the centralized remote cache?

My impression is the idea of lateral cache is fundamentally flawed.  So I
just igore it.

Hanson

Reply via email to