mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-26 02:09:52 +08:00
policy_cache.hpp
This commit is contained in:
parent
b98a8689f3
commit
a2e7a4d040
|
@ -38,13 +38,14 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
void
|
||||
const
|
||||
std::string*
|
||||
insert(std::string const &key_,
|
||||
std::string &val_)
|
||||
{
|
||||
if(_cache.size() > _max_size)
|
||||
_cache.erase(_cache.begin());
|
||||
_cache.insert({key_,val_});
|
||||
return &_cache.insert({key_,val_}).first;
|
||||
}
|
||||
|
||||
const
|
||||
|
|
Loading…
Reference in New Issue
Block a user