6#ifndef VERIBLOCK_POP_CPP_ETHASH_CACHE_PROVIDER_HPP
7#define VERIBLOCK_POP_CPP_ETHASH_CACHE_PROVIDER_HPP
9#include <veriblock/pop/crypto/progpow/cache.hpp>
17 virtual bool get(uint64_t epoch, std::shared_ptr<CacheEntry> out)
const = 0;
20 virtual void insert(uint64_t epoch, std::shared_ptr<CacheEntry> value) = 0;
22 std::shared_ptr<CacheEntry> getOrDefault(
24 std::function<std::shared_ptr<CacheEntry>()> factory)
override {
25 std::shared_ptr<CacheEntry> value;
26 if (!get(epoch, value)) {
34 void clear()
override {}