mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
policy_cache.hpp
This commit is contained in:
parent
b98a8689f3
commit
a2e7a4d040
1 changed files with 3 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue