1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

feat(remote): add a command to clear the cache (#1639)

* feat(remote): add a command to clear the cache

* Update cmd/task/task.go

Co-authored-by: Andrey Nering <andrey@nering.com.br>

* rebase

---------

Co-authored-by: Andrey Nering <andrey@nering.com.br>
This commit is contained in:
Valentin Maerten
2024-06-28 18:42:16 +02:00
committed by GitHub
parent a71020eab5
commit 76030c9146
4 changed files with 20 additions and 2 deletions

View File

@@ -66,3 +66,7 @@ func (c *Cache) filePath(node Node, suffix string) string {
}
return filepath.Join(c.dir, fmt.Sprintf("%s.%s.%s", prefix, c.key(node), suffix))
}
func (c *Cache) Clear() error {
return os.RemoveAll(c.dir)
}