mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 22:46:34 -05:00
policy_cache.hpp
This commit is contained in:
parent
1c4150a853
commit
3d7473e275
1 changed files with 8 additions and 8 deletions
|
|
@ -44,14 +44,14 @@ public:
|
|||
insert(std::string const &key_,
|
||||
std::string const &val_)
|
||||
{
|
||||
while(_cache.size() > _max_size)
|
||||
{
|
||||
std::string key;
|
||||
_cache.cvisit_while([&](Map::value_type const &v_)
|
||||
{
|
||||
key = v_.first;
|
||||
return false;
|
||||
});
|
||||
// while(_cache.size() > _max_size)
|
||||
// {
|
||||
// std::string key;
|
||||
// _cache.cvisit_while([&](Map::value_type const &v_)
|
||||
// {
|
||||
// key = v_.first;
|
||||
// return false;
|
||||
// });
|
||||
|
||||
_cache.erase(key);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue