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

Function RM_GetAbsExpire

app/redis-6.2.6/src/module.c:2393–2398  ·  view source on GitHub ↗

Return the key expire value, as absolute Unix timestamp. * If no TTL is associated with the key or if the key is empty, * REDISMODULE_NO_EXPIRE is returned. */

Source from the content-addressed store, hash-verified

2391 * If no TTL is associated with the key or if the key is empty,
2392 * REDISMODULE_NO_EXPIRE is returned. */
2393mstime_t RM_GetAbsExpire(RedisModuleKey *key) {
2394 mstime_t expire = getExpire(key->db,key->key);
2395 if (expire == -1 || key->value == NULL)
2396 return REDISMODULE_NO_EXPIRE;
2397 return expire;
2398}
2399
2400/* Set a new expire for the key. If the special expire
2401 * REDISMODULE_NO_EXPIRE is set, the expire is cancelled if there was

Callers

nothing calls this directly

Calls 1

getExpireFunction · 0.85

Tested by

no test coverage detected