mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
add menu item to clear image cache
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user