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

Method getExpire

src/db.cpp:1923–1934  ·  view source on GitHub ↗

Return the expire time of the specified key, or null if no expire * is associated with this key (i.e. the key is non volatile) */

Source from the content-addressed store, hash-verified

1921/* Return the expire time of the specified key, or null if no expire
1922 * is associated with this key (i.e. the key is non volatile) */
1923expireEntry *redisDbPersistentDataSnapshot::getExpire(const char *key) {
1924 /* No expire? return ASAP */
1925 if (expireSize() == 0)
1926 return nullptr;
1927
1928 auto itr = find_cached_threadsafe(key);
1929 if (itr == end())
1930 return nullptr;
1931 if (!itr.val()->FExpires())
1932 return nullptr;
1933 return &itr.val()->expire;
1934}
1935
1936const expireEntry *redisDbPersistentDataSnapshot::getExpire(const char *key) const
1937{

Callers 6

keyIsExpiredFunction · 0.45
migrateCommandFunction · 0.45
performEvictionsFunction · 0.45
activeExpireCycleCoreMethod · 0.45
ttlGenericCommandFunction · 0.45
RM_GetAbsExpireFunction · 0.45

Calls 2

FExpiresMethod · 0.80
valMethod · 0.45

Tested by

no test coverage detected