From ec3cbe3f766de062d754c8b9d90809077a1beb95 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sat, 29 Jul 2023 09:45:51 +0200 Subject: [PATCH] cache: Add dummy NoCache class --- cache/nocache.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 cache/nocache.h diff --git a/cache/nocache.h b/cache/nocache.h new file mode 100644 index 0000000..3d81c4f --- /dev/null +++ b/cache/nocache.h @@ -0,0 +1,30 @@ +#include "icache.h" + +class NoCache : public ICache +{ +public: + NoCache(std::string p) + { + + } + virtual std::optional get(std::string_view key) const + { + return {}; + } + virtual void put(std::string_view key, std::string val) + { + return; + } + virtual void remove(std::string_view key) + { + return; + } + virtual void removePrefix(std::string_view prefix) + { + return; + } + virtual void clear() + { + return; + } +};