I would like this to be a command-line switch (--enable-expiration).
Doing your own is a pain. What if you want client information to be
persisted for 4 days, but deleted after that. It would be great if
when the record was created, a queue somewhere else that said "hey,
delete this if it hasn't been touched by now" was created.
It's been mentioned as a possible future item. Also, it would be
great if you could give an error on non-zero expiration. That way the
client knows that their request was denied. (--enforce-zero-expiration-
set) (SET command with nonzero expiration would fail).
These seem not only a matter of completeness but correctness. Just
as C/C++ compilers generate warnings when the code you write is
obviously wrong here, so should this server.
Warren
It would be pretty simple to, at set time, store the unix timestamp of when this record ceases to be valid. Upon read of a record where that timestamp is in the past, memcachedb would see that, and return as if it were not in existence. Most applications will immediately come along and replace the record, so no need to delete it. Further, this time stamp could be used as the key to a secondary index b-tree to allow an expunger thread to simply get rid of them periodically (tunables to prevent this from deleting too fast would be nice, so that users can choose to let the db grow a bit rather than overwhelm their system with deletes).
So, the next question is, who wants to sponsor such an effort? I've already done this all in a PHP wrapper, but yeah, it would be cool to have the daemon doing it.
> --
> You received this message because you are subscribed to the Google Groups "memcachedb" group.
> To post to this group, send email to memca...@googlegroups.com.
> To unsubscribe from this group, send email to memcachedb+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/memcachedb?hl=en.
>