From 0834b17e6997c0e500367630922d06db0c2c7f13 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Tue, 12 Mar 2024 19:21:23 -0500 Subject: [PATCH] policy_cache.hpp --- src/policy_cache.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/policy_cache.hpp b/src/policy_cache.hpp index b13e1684..40dd7322 100644 --- a/src/policy_cache.hpp +++ b/src/policy_cache.hpp @@ -54,15 +54,16 @@ public: std::string const &val_) { uint64_t hash; - STRPOOL_U64 str; const char *ptr; + STRPOOL_U64 token; fmt::print("insert {}={}\n", key_, val_); hash = wyhash(key_.c_str(),key_.size(),0xdeadbeef,_wyp); - val = + token = strpool_inject(&_strpool,val_.c_str(),val_.size()); + ptr _cache.insert_or_assign(hash,val_); }