template class EE::LRUCache

#include <lrucache.hpp>

template <std::size_t Capacity, typename KeyT = std::uint64_t, typename ValueT = std::array<char, 64>>
class LRUCache {
public:
    // typedefs

    typedef std::conditional_t<sizeof(KeyT)<=2*sizeof(void*)&&std::is_trivially_copyable_v<KeyT>, KeyT, const KeyT&> KeyParamT;

    // methods

    std::optional<ValueT> get(KeyParamT key);
    void put(KeyT key, ValueT value);
    void clear();
    std::size_t size() const;
    static constexpr std::size_t capacity();
    static constexpr bool is_static();
};