policy_cache.hpp

This commit is contained in:
Antonio SJ Musumeci 2024-02-16 00:08:09 -06:00
parent 892e12ed8d
commit e071a07ab7

View File

@ -42,6 +42,8 @@ public:
insert(std::string const &key_,
std::string &val_)
{
if(_cache.size() > _max_size)
_cache.erase(_cache.begin());
_cache.insert({key_,val_});
}