diff options
Diffstat (limited to 'weed/filer/filechunk_group.go')
| -rw-r--r-- | weed/filer/filechunk_group.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/weed/filer/filechunk_group.go b/weed/filer/filechunk_group.go index de469f310..c89527710 100644 --- a/weed/filer/filechunk_group.go +++ b/weed/filer/filechunk_group.go @@ -12,13 +12,15 @@ type ChunkGroup struct { chunkCache chunk_cache.ChunkCache sections map[SectionIndex]*FileChunkSection sectionsLock sync.RWMutex + readerCache *ReaderCache } func NewChunkGroup(lookupFn wdclient.LookupFileIdFunctionType, chunkCache chunk_cache.ChunkCache, chunks []*filer_pb.FileChunk) (*ChunkGroup, error) { group := &ChunkGroup{ - lookupFn: lookupFn, - chunkCache: chunkCache, - sections: make(map[SectionIndex]*FileChunkSection), + lookupFn: lookupFn, + chunkCache: chunkCache, + sections: make(map[SectionIndex]*FileChunkSection), + readerCache: NewReaderCache(32, chunkCache, lookupFn), } err := group.SetChunks(chunks) |
