Browse Source

policy_cache.hpp

getattr-cache
Antonio SJ Musumeci 8 months ago
parent
commit
64926b69f6
  1. 10
      src/policy_cache.hpp

10
src/policy_cache.hpp

@ -60,19 +60,21 @@ public:
size_t const keylen_, size_t const keylen_,
std::string const &val_) std::string const &val_)
{ {
Key key;
uint64_t hash; uint64_t hash;
STRPOOL_U64 token; STRPOOL_U64 token;
key = key_;
hash = wyhash(key_,keylen_,0xdeadbeef,_wyp); hash = wyhash(key_,keylen_,0xdeadbeef,_wyp);
_cache.insert_or_assign(hash,val_); _cache.insert_or_assign(hash,val_);
fmt::print("insert {}={} token={} ptr={}\n",
fmt::print("insert {}={} token={}\n",
key_, key_,
val_, val_,
token,
ptr);
token);
return ptr;
return key;
} }
Key Key

Loading…
Cancel
Save