deleteCacheDirByKey static method

Future<void> deleteCacheDirByKey(
  1. String key
)

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);
}