30 std::unordered_map<std::filesystem::path, std::string, utility::pathHash> cacheData;
32 std::atomic<uint64_t> currentCacheSize;
33 mutable std::mutex cacheDataMutex;
38 static Cache& getCache();
49 CacheResultCodes addCache(
const std::filesystem::path& filePath, std::ios_base::openmode mode);
70 bool contains(
const std::filesystem::path& filePath)
const;
77 void clear(
const std::filesystem::path& filePath);
81 void setCacheSize(uint64_t sizeInBytes);
86 const std::string& getCacheData(
const std::filesystem::path& filePath)
const;
90 uint64_t getCacheSize()
const;
94 uint64_t getCurrentCacheSize()
const;
101 const std::string& operator [] (
const std::filesystem::path& filePath)
const;
103 friend void _utility::addCache(std::filesystem::path&& filePath, std::string&& data);
106 friend void _utility::changeCurrentCacheSize(uint64_t amount);