| 22 | |
| 23 | public: |
| 24 | std::string GetAllCache() |
| 25 | { |
| 26 | std::scoped_lock locker(_cache_lock); |
| 27 | std::string result; |
| 28 | result += "[\n"; |
| 29 | for (const auto& item : _cache) |
| 30 | { |
| 31 | result += " {\n"; |
| 32 | result += " \"key\": \"" + item.first + "\",\n"; |
| 33 | result += " \"value\": \"" + item.second + "\",\n"; |
| 34 | result += " },\n"; |
| 35 | } |
| 36 | result += "]\n"; |
| 37 | return result; |
| 38 | } |
| 39 | |
| 40 | bool GetCacheValue(std::string_view key, std::string& value) |
| 41 | { |