summaryrefslogtreecommitdiff
path: root/src/db.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-01-28 13:00:03 +0100
committerantirez <antirez@gmail.com>2013-01-28 13:15:19 +0100
commit4dfb5752e0714228ff6fb0a2728ee03638ac232f (patch)
tree6e498bb0b732c8cfbc82dde22eaa49d0391a72c7 /src/db.c
parent562b2bd6a7d6e8ee893d68059360b593ed43352f (diff)
downloadredis-4dfb5752e0714228ff6fb0a2728ee03638ac232f.tar.gz
Send 'expired' events when a key expires by lookup.
Diffstat (limited to 'src/db.c')
-rw-r--r--src/db.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/db.c b/src/db.c
index 220503c35..8429aa4b5 100644
--- a/src/db.c
+++ b/src/db.c
@@ -543,6 +543,8 @@ int expireIfNeeded(redisDb *db, robj *key) {
/* Delete the key */
server.stat_expiredkeys++;
propagateExpire(db,key);
+ notifyKeyspaceEvent(REDIS_NOTIFY_EXPIRED,
+ "expired",key,db->id);
return dbDelete(db,key);
}