My understanding is that items will expire in two fundamental ways; if a
TTL was specified on the set or if the cache needs room and deletes old
items.
My quesions are:
Is this understanding fully correct ?
Yes.
Is there a way to tell the cache that an item should be fully
persistent - i.e. don't throw it away for any reason ?
This is not supported by default - as the idea is if the memcache has enough
ram it should not evict any items (without TTL).
But there is a patch floating arround (
http://lists.danga.com/pipermail/memcached/2007-March/003747.html ) which
does what you asked for.
I have asked later (
http://lists.danga.com/pipermail/memcached/2007-April/003956.html ) for
some confirmations but it was neither accepted nor denied (by anyone) ..
If you're really interested I think I may have also an updated patch version
for current release.
Just using it is on your own risk :)
We are pretty happy and it works on quite heavy production environment..
rr