How to get callback when key expires in REDIS

Kartik Rokde picture Kartik Rokde · Nov 1, 2012 · Viewed 23.7k times · Source

I'm developing application using Bottle. In my registration form, I'm confirming email by mail with a unique key. I'm storing this key in REDIS with expiry of 4 days. If user does not confirm email within 4 days, key gets expired. for this, I want to permanently delete the user entry from my database(mongoDB).

Ofcourse I dont require continous polling to my redis server to check whether key exists or not.

Is there any way to get a callback from Redis??

OR is there any other efficient way?

Answer

Nikita Koksharov picture Nikita Koksharov · Jan 20, 2014

This feature implemented in Redis 2.8, read about it here http://redis.io/topics/notifications