chore: initial commit
Some checks failed
Code Analysis / analysis (push) Failing after 2m59s

This commit is contained in:
2025-12-30 22:34:58 +07:00
commit 35a6349071
63 changed files with 2675 additions and 0 deletions

21
rediska/cache/CachePolicy.hpp vendored Normal file
View File

@@ -0,0 +1,21 @@
#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;
};
}