add menu item to clear image cache

This commit is contained in:
ouwou committed 2021-01-20 02:26:04 -05:00
1 parent dda203376d
commit bafd2fa25a
6 files changed
+18

No files matched your search

+5
View File
@@ -17,6 +17,11 @@ Cache::~Cache() {
fprintf(stderr, "error removing tmp dir\n");
}
void Cache::ClearCache() {
for (const auto &path : std::filesystem::directory_iterator(m_tmp_path))
std::filesystem::remove_all(path);
}
std::string Cache::GetCachedName(std::string str) {
uint32_t out;
MurmurHash3_x86_32(str.c_str(), str.size(), 0, &out);