6#include <userver/storages/redis/exception.hpp>
7#include <userver/storages/redis/fwd.hpp>
11namespace storages::
redis {
15 enum class TtlReplyValue { kKeyDoesNotExist = -2, kKeyHasNoExpiration = -1 };
17 static constexpr TtlReplyValue kKeyDoesNotExist = TtlReplyValue::kKeyDoesNotExist;
18 static constexpr TtlReplyValue kKeyHasNoExpiration = TtlReplyValue::kKeyHasNoExpiration;
20 explicit TtlReply(int64_t value);
21 TtlReply(TtlReplyValue value);
23 static TtlReply Parse(ReplyData&& reply_data,
const std::string& request_description = {});
25 bool KeyExists()
const;
26 bool KeyHasExpiration()
const;
27 size_t GetExpireSeconds()
const;
41#ifdef USERVER_FEATURE_LEGACY_REDIS_NAMESPACE
43using storages::redis::KeyHasNoExpirationException;
44using storages::redis::TtlReply;