| 31 | } |
| 32 | |
| 33 | bool 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 | |
| 48 | void Xtc::setupCacheDir() const { |
| 49 | if (Storage.exists(cachePath.c_str())) { |