ashish-goyal / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[feature request] #631

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Would be nice if we can have set's with expiration of the elements.

use case - create a bunch of keys - user:1, user:2, user:3 . Make expiration on 
some of them. Then make a set and 
sadd users:all 1
sadd users:all 2
sadd users:all 3

then sometime in the future, may be key user:2 is expired, but it sill exists 
in the set.

I realize this is complicated to be done, but it will be very useful since sets 
are used as "buckets" where you can organize keys.

Original issue reported on code.google.com by nikolay....@gmail.com on 11 Aug 2011 at 6:05

GoogleCodeExporter commented 8 years ago
You can use a variant of the manual expiration recipe at the bottom of this 
blog post: http://dr-josiah.blogspot.com/2011/02/some-redis-use-cases.html

Original comment by josiah.c...@gmail.com on 11 Aug 2011 at 9:52