mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Signal key as modified when expired on-access.
This fixes WATCH and client side caching with keys expiring because of a synchronous access and not because of background expiring.
This commit is contained in:
parent
090bc0c1a3
commit
20eeddfb8a
6
src/db.c
6
src/db.c
@ -1296,8 +1296,10 @@ int expireIfNeeded(redisDb *db, robj *key) {
|
|||||||
propagateExpire(db,key,server.lazyfree_lazy_expire);
|
propagateExpire(db,key,server.lazyfree_lazy_expire);
|
||||||
notifyKeyspaceEvent(NOTIFY_EXPIRED,
|
notifyKeyspaceEvent(NOTIFY_EXPIRED,
|
||||||
"expired",key,db->id);
|
"expired",key,db->id);
|
||||||
return server.lazyfree_lazy_expire ? dbAsyncDelete(db,key) :
|
int retval = server.lazyfree_lazy_expire ? dbAsyncDelete(db,key) :
|
||||||
dbSyncDelete(db,key);
|
dbSyncDelete(db,key);
|
||||||
|
if (retval) signalModifiedKey(db,key);
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user