I have a patch I'd like to contribute, if you guys would like. This adds a new feature; I'm not sure if this conflicts with other development or sort of steps on other functionality but let me give you the background and what I did.
For an e-commerce site I'm working on we needed a solution for fast server-side carts. After looking at a few options Redis made the most sense. We brought up a Redis server (as well as a slave, for replication) and store carts as a session ID mapping to a hash object (i.e. HSET and HGET).
To eliminate cruft from abandoned carts I used EXPIRE so that old carts will idle away after some generous amount of time. I realized that changes to a hash that's set to EXPIRE will actually eliminate all items in the cart, due to EXPIRE semantics. I worked around it with a complete hash read + rewrite with new data, followed by a new EXPIRE.
That works (it's in production now) but the reading, deleting, re- writing, and EXPIRE-ing might get costly. I added a new function "IDLE" that's similar but allows changing of something that's set to IDLE without destroying all the state. Things that are idle and untouched (read, written to) get deleted like the EXPIREd items do.
This doesn't address all the issues as I saw discussed previously on the FAQ about updating items set to EXPIRE, namely the ones concerning replication and replays from the binary log. Regardless I see more grumblings from people wanting to change EXPIRE-ing stuff than people concerned with those (indeed, legitimate) issues. So I'd like to release this in the hopes the community finds this useful. (Perhaps a warning, in documentation form or a message spit out at runtime, would help prevent ill effects.)
I hope you guys find this patch useful. This was written as part of my usual job at Sony Music Entertainment, supporting stores on www.sonymusicdigital.com. I just got consent to release this little bit of code to the BSD-licensed project.
My gmail account (in case that's necessary for me to add files under the project in Google Code) is:
I can be contacted there if you have any further questions.
Thanks for creating Redis! I hope this contribution is at least partial payback. :)