mirror of
https://github.com/restic/restic.git
synced 2026-10-08 19:37:12 +00:00
repository: expose cache via method
This commit is contained in:
1 parent
99e105eeb6
commit
b7ff8ea9cd
6 files changed
+21
-17
No files matched your search
@@ -40,9 +40,9 @@ func (e *partialReadError) Error() string {
|
||||
func CheckPack(ctx context.Context, r *Repository, id restic.ID, blobs []restic.Blob, size int64, bufRd *bufio.Reader, dec *zstd.Decoder) error {
|
||||
err := checkPackInner(ctx, r, id, blobs, size, bufRd, dec)
|
||||
if err != nil {
|
||||
if r.Cache != nil {
|
||||
if r.cache != nil {
|
||||
// ignore error as there's not much we can do here
|
||||
_ = r.Cache.Forget(backend.Handle{Type: restic.PackFile, Name: id.String()})
|
||||
_ = r.cache.Forget(backend.Handle{Type: restic.PackFile, Name: id.String()})
|
||||
}
|
||||
|
||||
// retry pack verification to detect transient errors
|
||||
|
||||
Reference in new issue
Block a user