i want to store in redis a set of uncertain length and the whole set should expire after a few minutes.
So, i'm doing:
RPUSH 'a' 'b'
EXPIRE 'a' 120
RPUSH 'a' 'c'
EXPIRE 'a' 120
but in this case i have only 'c' in 'a', because the first RPUSH after EXPIRE desroys the old value.
Setting EXPIRE first, we have TTL->-1 after first RPUSH.
So my question, is there the way to do that i want?