我正在使用Bottle开发应用程序.在我的注册表中,我要通过邮件确认带有唯一密钥的电子邮件.我将此密钥存储在REDIS中,有效期为4天.如果用户未在4天内确认电子邮件,则密钥将过期.为此,我想从数据库(mongoDB)中永久删除用户条目.
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).
当然,我不需要对我的Redis服务器进行连续轮询来检查密钥是否存在.
Ofcourse I dont require continous polling to my redis server to check whether key exists or not.
有什么方法可以从Redis中获取回调吗?
Is there any way to get a callback from Redis??
或者还有其他有效的方法吗?
OR is there any other efficient way?
推荐答案此功能在Redis 2.8中实现,请在此处阅读 redis.io/topics/notifications
This feature implemented in Redis 2.8, read about it here redis.io/topics/notifications
更多推荐
REDIS中密钥过期时如何获取回调
发布评论