On 22 Jul 2010, at 14:30, Manik Surtani wrote:
On 22 Jul 2010, at 09:11, Galder ZamarreƱo wrote:
>>>
>>> It's not considered here, but I think it'd be hard to figure out that
expiration is not in use at runtime. You'd have to track calls with expiration and
make sure there's at least one expiration that has not expired. Probably not
practical.
>> well spotted! Not hard to implement, and definitely simple for the users, as
doesn't need an additional config.
>
> Not hard to implement? You'd need a separate collection to track those nodes to
which expiration has been set, including those nodes that might have evicted from memory
but are still present in the cache store (imagine a node with expire=1 day, but for
eviction +passivation reasons, it has been moved to cache store after 1 min). On top of
that, you'd need to update the collection everytime a node is expired to remove it
from there. Then, in every call to purge entries from a cache store, you'd have to
check this collection to see whether it's empty or not to decide whether to call purge
entries on cache store. The latter is not difficult, but the tracking can get complicated
v easily. IMO, not worth it.
Yeah I agree with Galder. It gets even more complicated when you take distribution into
account since with nodes not having a complete view of global state, a rehash may bring in
expirable entries. Guys, please don't do this. :)
I was not thinking to
implement it like this, see my last email in this chain.