From 7bbef9e5aede5c931fcba2fc4980fa3487913c27 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Tue, 12 Mar 2024 19:19:32 -0500 Subject: [PATCH] policy_cache.hpp --- src/policy_cache.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/policy_cache.hpp b/src/policy_cache.hpp index 4309e349..298c8cf1 100644 --- a/src/policy_cache.hpp +++ b/src/policy_cache.hpp @@ -53,13 +53,16 @@ public: insert(std::string const &key_, std::string const &val_) { - uint64_t hash; + uint64_t hash; + const char *val; fmt::print("insert {}={}\n", key_, val_); - hash = wyhash(key_.c_str(),key_.size(),0xdeadbeef,_wyp); + hash = wyhash(key_.c_str(),key_.size(),0xdeadbeef,_wyp); + + _cache.insert_or_assign(hash,val_); }