| 178 | */ |
| 179 | Value getCopy(const Key &key) { return get(key); } |
| 180 | bool remove(const Key &key) { |
| 181 | Guard g(lock_); |
| 182 | auto iter = cache_.find(key); |
| 183 | if (iter == cache_.end()) { |
| 184 | return false; |
| 185 | } |
| 186 | keys_.erase(iter->second); |
| 187 | cache_.erase(iter); |
| 188 | return true; |
| 189 | } |
| 190 | bool contains(const Key &key) { |
| 191 | Guard g(lock_); |
| 192 | return cache_.find(key) != cache_.end(); |
no test coverage detected