s3: Remove cache

This commit is contained in:
Alexander Neumann 2017-06-07 20:51:45 +02:00
parent f2a51aa37c
commit a46baf7685
1 changed files with 8 additions and 12 deletions

View File

@ -8,7 +8,6 @@ import (
"path" "path"
"restic" "restic"
"strings" "strings"
"sync"
"time" "time"
"restic/backend" "restic/backend"
@ -23,12 +22,10 @@ const connLimit = 10
// s3 is a backend which stores the data on an S3 endpoint. // s3 is a backend which stores the data on an S3 endpoint.
type s3 struct { type s3 struct {
client *minio.Client client *minio.Client
sem *backend.Semaphore sem *backend.Semaphore
bucketname string bucketname string
prefix string prefix string
cacheMutex sync.RWMutex
cacheObjSize map[string]int64
backend.Layout backend.Layout
} }
@ -53,11 +50,10 @@ func Open(cfg Config) (restic.Backend, error) {
} }
be := &s3{ be := &s3{
client: client, client: client,
sem: sem, sem: sem,
bucketname: cfg.Bucket, bucketname: cfg.Bucket,
prefix: cfg.Prefix, prefix: cfg.Prefix,
cacheObjSize: make(map[string]int64),
} }
client.SetCustomTransport(backend.Transport()) client.SetCustomTransport(backend.Transport())