summaryrefslogtreecommitdiff
path: root/src/expire.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-07-22 12:29:54 +0200
committerantirez <antirez@gmail.com>2019-07-22 12:29:54 +0200
commit842b44dc46cc143fb28f8cadbff1fda9c81e09e2 (patch)
tree0a87f05434e6d4f9cb4c3d0e3b1501303e0d176c /src/expire.c
parentf850201c6407d5504b08f2630f525a353a7ef740 (diff)
downloadredis-842b44dc46cc143fb28f8cadbff1fda9c81e09e2.tar.gz
Client side caching: call the invalidation functions always.
Otherwise what happens is that the tracking table will never get garbage collected if there are no longer clients with tracking enabled. Now the invalidation function immediately checks if there is any table allocated, otherwise it returns ASAP, so the overhead when the feature is not used should be near zero.
Diffstat (limited to 'src/expire.c')
-rw-r--r--src/expire.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expire.c b/src/expire.c
index b23117a3c..598b27f96 100644
--- a/src/expire.c
+++ b/src/expire.c
@@ -64,7 +64,7 @@ int activeExpireCycleTryExpire(redisDb *db, dictEntry *de, long long now) {
dbSyncDelete(db,keyobj);
notifyKeyspaceEvent(NOTIFY_EXPIRED,
"expired",keyobj,db->id);
- if (server.tracking_clients) trackingInvalidateKey(keyobj);
+ trackingInvalidateKey(keyobj);
decrRefCount(keyobj);
server.stat_expiredkeys++;
return 1;