MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / clearCache

Method clearCache

lib/Xtc/Xtc.cpp:33–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33bool Xtc::clearCache() const {
34 if (!Storage.exists(cachePath.c_str())) {
35 LOG_DBG("XTC", "Cache does not exist, no action needed");
36 return true;
37 }
38
39 if (!Storage.removeDir(cachePath.c_str())) {
40 LOG_ERR("XTC", "Failed to clear cache");
41 return false;
42 }
43
44 LOG_DBG("XTC", "Cache cleared successfully");
45 return true;
46}
47
48void Xtc::setupCacheDir() const {
49 if (Storage.exists(cachePath.c_str())) {

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
removeDirMethod · 0.80

Tested by

no test coverage detected