added clean function to cacheClient and sync()
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user