clearCache method

Future<void> clearCache(
  1. String repo,
  2. String skillName, {
  3. String branch = 'main',
})

Clear the cache for a specific skill

repo Repository in format 'owner/repo' skillName Name of the skill to uncache branch Git branch (default: 'main')

Implementation

Future<void> clearCache(
  String repo,
  String skillName, {
  String branch = 'main',
}) async {
  final cacheKey = '$repo-$branch-$skillName';
  final cacheFile = File(p.join(cacheDir, '$cacheKey.md'));

  if (await cacheFile.exists()) {
    await cacheFile.delete();
  }
}