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) */
| 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) */ |
| 1923 | expireEntry *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 | |
| 1936 | const expireEntry *redisDbPersistentDataSnapshot::getExpire(const char *key) const |
| 1937 | { |
no test coverage detected