chnaghong1990 / redis

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

[Feature request] - Should be able to expire a field in a hash table #597

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of Redis you are using, in what kind of Operating System?
2.2.7

What is the problem you are experiencing?
There is no way to expire a particular field in hash table.

What steps will reproduce the problem?
NA

Do you have an INFO output? Please past it here.
NA

If it is a crash, can you please paste the stack trace that you can find in
the log file or on standard output? This is really useful for us!
NA

Please provide any additional information below.
I was wondering if redis can provide a command to expire a field in a hash 
table. I need to keep the items in the hash table with some TTL. Items should 
expire on their own and allow me to have a call back to know which item has 
expired to take the necessary action on expiration. Is it doable? Does hash 
table support key expire feature?

Original issue reported on code.google.com by sonal...@gmail.com on 28 Jun 2011 at 7:34

GoogleCodeExporter commented 8 years ago
I've got bad news for you: not only has this been requested before, but it's 
already been rejected before. If you want to get expiration, you can pull your 
members from the hash into the main hash and use expiration there.

Also, Redis doesn't have server-side triggers, callbacks, etc. The best-case 
scenario is for you to execute a 'monitor' command on your client to watch 
commands, and in the case of a delete due to an expire, your monitoring client 
can take action.

Original comment by josiah.c...@gmail.com on 28 Jun 2011 at 4:44

GoogleCodeExporter commented 8 years ago

Original comment by pcnoordh...@gmail.com on 6 Jul 2011 at 11:06