On Sun, Dec 6, 2009 at 10:18 AM, Matt Todd <
chio...@gmail.com> wrote:
> Essentially, volatile keys are considered well enough deleted and should be
> removed before performing any write request.
> Matt
Exactly Matt, and now that we have an append only file it's much
simpler to explain why this is so much needed.
The client performs:
SET a 10
EXPIRE a 60
(sleeps for 100 seconds)
INCR a
a will be 1, since the key is already expired after 100 seconds.
But what we have in the append only file? The same commands without
timings, so there is no delay between EXPIRE and INCR when Redis
re-read the file on startup (the same applies for master-slave
replication).
a would be 61 after reloading the file without such a semantic.
Time dependent behavior is not a good idea for Redis...
Cheers,
Salvatore
--
Salvatore 'antirez' Sanfilippo
http://invece.org
"Once you have something that grows faster than education grows,
you’re always going to get a pop culture.", Alan Kay