added clean function to cacheClient and sync()

This commit is contained in:
2026-05-29 04:02:02 -06:00
parent 34f49cf6ca
commit 71d83df5f7
+2
View File
@@ -19,6 +19,7 @@ const (
type CacheClient interface { type CacheClient interface {
FetchDB(repo string) error FetchDB(repo string) error
Fetch(relpath string) (*cache.CacheFile, error) Fetch(relpath string) (*cache.CacheFile, error)
Clean() error
} }
type RepoSync struct { type RepoSync struct {
@@ -86,6 +87,7 @@ func (r *RepoSync) Sync() error {
slog.Info("finished pkg update") slog.Info("finished pkg update")
// call cache cleanup // call cache cleanup
err = r.c.Clean()
} }
return nil return nil
} }