MCPcopy Create free account
hub / github.com/F-Stack/f-stack / checkAlreadyExpired

Function checkAlreadyExpired

app/redis-6.2.6/src/expire.c:469–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469int checkAlreadyExpired(long long when) {
470 /* EXPIRE with negative TTL, or EXPIREAT with a timestamp into the past
471 * should never be executed as a DEL when load the AOF or in the context
472 * of a slave instance.
473 *
474 * Instead we add the already expired key to the database with expire time
475 * (possibly in the past) and wait for an explicit DEL from the master. */
476 return (when <= mstime() && !server.loading && !server.masterhost);
477}
478
479/*-----------------------------------------------------------------------------
480 * Expires Commands

Callers 3

expireGenericCommandFunction · 0.85
getexCommandFunction · 0.85
restoreCommandFunction · 0.85

Calls 1

mstimeFunction · 0.70

Tested by

no test coverage detected