like this
`
void Put(const Key &key, const Value &value) noexcept
{
auto elem_it = FindElem(key);
{
operation_guard lock{safe_op};
if (elem_it == cache_items_map.end())
{
// add new element to the cache
if (cache_items_map.size() + 1 > max_cache_size)
{
auto disp_candidate_key = cache_policy.ReplCandidate();
Erase(disp_candidate_key);
}
Insert(key, std::move(value));
}
else
{
// update previous value
Update(key, std::move(value));
}
}
}
`
like this
`
void Put(const Key &key, const Value &value) noexcept
{
auto elem_it = FindElem(key);
`