MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / RM_GetAbsExpire

Function RM_GetAbsExpire

src/module.cpp:2481–2486  ·  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

2479 * If no TTL is associated with the key or if the key is empty,
2480 * REDISMODULE_NO_EXPIRE is returned. */
2481mstime_t RM_GetAbsExpire(RedisModuleKey *key) {
2482 auto expire = key->db->getExpire(key->key);
2483 if (expire == nullptr || key->value == NULL)
2484 return REDISMODULE_NO_EXPIRE;
2485 return expire->when();
2486}
2487
2488/* Set a new expire for the key. If the special expire
2489 * REDISMODULE_NO_EXPIRE is set, the expire is cancelled if there was

Callers

nothing calls this directly

Calls 2

getExpireMethod · 0.45
whenMethod · 0.45

Tested by

no test coverage detected