| 59 | } |
| 60 | |
| 61 | bool DeleteCacheValue(std::string_view key, std::string& value) |
| 62 | { |
| 63 | std::scoped_lock locker(_cache_lock); |
| 64 | auto it = _cache.find(key); |
| 65 | if (it != _cache.end()) |
| 66 | { |
| 67 | value = it->second; |
| 68 | _cache.erase(it); |
| 69 | return true; |
| 70 | } |
| 71 | else |
| 72 | return false; |
| 73 | } |
| 74 | |
| 75 | private: |
| 76 | std::mutex _cache_lock; |
no test coverage detected