Use new fscache's SetKeyMapper
See https://github.com/djherbis/fscache/commit/a0daa9e52747abb014105525761b2668b19b0818
This commit is contained in:
Vendored
+10
-1
@@ -201,5 +201,14 @@ func newFSCache(name, cacheSize, cacheFolder string, maxItems int) (fscache.Cach
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return fscache.NewCacheWithHaunter(fs, h)
|
||||
ck, err := fscache.NewCacheWithHaunter(fs, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if conf.Server.DevNewCacheLayout {
|
||||
ck.SetKeyMapper(fs.(*spreadFS).KeyMapper)
|
||||
}
|
||||
|
||||
return ck, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user