| 52 | } |
| 53 | |
| 54 | void Cache::clear(Cache::StorageScope Scope, std::string_view Key) { |
| 55 | auto Root = getRoot(Scope); |
| 56 | if (!Key.empty()) { |
| 57 | Root /= std::filesystem::u8path(Key); |
| 58 | } |
| 59 | std::error_code ErrCode; |
| 60 | std::filesystem::remove_all(Root, ErrCode); |
| 61 | } |
| 62 | |
| 63 | } // namespace AOT |
| 64 | } // namespace WasmEdge |