6#include <userver/storages/redis/exception.hpp>
7#include <userver/storages/redis/impl/types.hpp>
15 enum class TtlReplyValue { kKeyDoesNotExist = -2, kKeyHasNoExpiration = -1 };
17 static constexpr TtlReplyValue kKeyDoesNotExist =
18 TtlReplyValue::kKeyDoesNotExist;
19 static constexpr TtlReplyValue kKeyHasNoExpiration =
20 TtlReplyValue::kKeyHasNoExpiration;
22 explicit TtlReply(int64_t value);
23 TtlReply(TtlReplyValue value);
25 static TtlReply Parse(ReplyData&& reply_data,
26 const std::string& request_description = {});
28 bool KeyExists()
const;
29 bool KeyHasExpiration()
const;
30 size_t GetExpireSeconds()
const;