WATCH will now consider touched keys target of EXPIRE command after the WATCH is performed, but not before

This commit is contained in:
antirez
2010-07-05 19:38:12 +02:00
parent 3688d7f308
commit b7a8daef60
2 changed files with 23 additions and 0 deletions

View File

@@ -111,4 +111,25 @@ start_server {tags {"cas"}} {
r ping
r exec
} {PONG}
test {WATCH will consider touched keys target of EXPIRE} {
r del x
r set x foo
r watch x
r expire x 10
r multi
r ping
r exec
} {}
test {WATCH will not consider touched expired keys} {
r del x
r set x foo
r expire x 2
r watch x
after 3000
r multi
r ping
r exec
} {PONG}
}