deleteCacheDirByKey static method
Deletes a specific cache directory by its key.
If the root cache path is not initialized, the method does nothing. The deletion is recursive.
Implementation
static Future<void> deleteCacheDirByKey(String key) async {
if (cacheRootPath.isEmpty) return;
await Directory('$cacheRootPath/$key').delete(recursive: true);
}