Files
Rediska/rediska/cache/CachePolicy.hpp
Nikita Astafyev 35a6349071
Some checks failed
Code Analysis / analysis (push) Failing after 2m59s
chore: initial commit
2025-12-30 22:34:58 +07:00

22 lines
585 B
C++

#include "rediska/common/MessageArguments.hpp"
#include "rediska/common/enums.hpp"
#include "rediska/common/types.hpp"
namespace cache {
class CachePolicy {
public:
virtual ~CachePolicy() = default;
virtual void get(CacheKey&& key) = 0;
virtual void set(CacheKey&& key, CacheValue&& value, TTL ttl) = 0;
virtual void applyTo(CacheKey&& key, OperationId op, MessageArguments&& args) = 0;
protected:
virtual void evict() = 0;
[[nodiscard]] virtual inline bool isFull() const = 0;
};
}