mirror of
https://github.com/kopia/kopia.git
synced 2026-03-13 03:36:34 -04:00
* cache: refactored reusable portion of cache into separate package * repo: plumbed through caching for remote repository clients * repo: plumb through cache in the unit tests * cache: ensure we only allow absolute cache paths, fixed cache path resolution for remote repositories
15 lines
265 B
Go
15 lines
265 B
Go
package content
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/repo/blob"
|
|
)
|
|
|
|
type cacheKey string
|
|
|
|
type contentCache interface {
|
|
close(ctx context.Context)
|
|
getContent(ctx context.Context, cacheKey cacheKey, blobID blob.ID, offset, length int64) ([]byte, error)
|
|
}
|