start_server {tags {"expire"}} {
- test {EXPIRE - don't set timeouts multiple times} {
+ test {EXPIRE - set timeouts multiple times} {
r set x foobar
set v1 [r expire x 5]
set v2 [r ttl x]
set v3 [r expire x 10]
set v4 [r ttl x]
+ r expire x 4
list $v1 $v2 $v3 $v4
- } {1 5 0 5}
+ } {1 5 1 10}
test {EXPIRE - It should be still possible to read 'x'} {
r get x
} {{} 0}
}
- test {EXPIRE - Delete on write policy} {
+ test {EXPIRE - write on expire should work} {
r del x
r lpush x foo
r expire x 1000
r lpush x bar
r lrange x 0 -1
- } {bar}
+ } {bar foo}
test {EXPIREAT - Check for EXPIRE alike behavior} {
r del x