mirror of
https://github.com/kopia/kopia.git
synced 2026-03-27 10:32:08 -04:00
This helps recycle buffers more efficiently during snapshots. Also, improved memory tracking, enabled profiling flags and added pprof by default.
21 lines
548 B
Go
21 lines
548 B
Go
package content
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/internal/gather"
|
|
"github.com/kopia/kopia/repo/blob"
|
|
)
|
|
|
|
// passthroughContentCache is a contentCache which does no caching.
|
|
type passthroughContentCache struct {
|
|
st blob.Storage
|
|
}
|
|
|
|
func (c passthroughContentCache) close(ctx context.Context) {}
|
|
|
|
func (c passthroughContentCache) getContent(ctx context.Context, cacheKey cacheKey, blobID blob.ID, offset, length int64, output *gather.WriteBuffer) error {
|
|
// nolint:wrapcheck
|
|
return c.st.GetBlob(ctx, blobID, offset, length, output)
|
|
}
|