mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 06:56:27 -05:00
policy_cache.hpp
This commit is contained in:
parent
b26a144844
commit
281ea05601
1 changed files with 3 additions and 2 deletions
|
|
@ -51,14 +51,15 @@ public:
|
|||
public:
|
||||
const
|
||||
char*
|
||||
insert(const char *key_,
|
||||
insert(char const *key_,
|
||||
size_t const keylen_,
|
||||
std::string const &val_)
|
||||
{
|
||||
uint64_t hash;
|
||||
const char *ptr;
|
||||
STRPOOL_U64 token;
|
||||
|
||||
hash = wyhash(key_.c_str(),key_.size(),0xdeadbeef,_wyp);
|
||||
hash = wyhash(key_,key_.size(),0xdeadbeef,_wyp);
|
||||
token = strpool_inject(&_strpool,val_.c_str(),val_.size());
|
||||
ptr = strpool_cstr(&_strpool,token);
|
||||
_cache.insert_or_assign(hash,ptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue