diff --git a/weed/filer/reader_at.go b/weed/filer/reader_at.go index 82ece52db..93fa76a2e 100644 --- a/weed/filer/reader_at.go +++ b/weed/filer/reader_at.go @@ -258,7 +258,7 @@ func (c *ChunkReadAt) readChunkSliceAt(ctx context.Context, buffer []byte, chunk if nextChunkViews != nil && c.prefetchCount > 0 { // Prefetch multiple chunks ahead for better sequential read throughput // This keeps the network pipeline full with parallel chunk fetches - c.readerCache.MaybeCacheMany(nextChunkViews, c.prefetchCount) + c.readerCache.MaybeCache(nextChunkViews, c.prefetchCount) } } } diff --git a/weed/filer/reader_cache.go b/weed/filer/reader_cache.go index 86906d042..605be5e73 100644 --- a/weed/filer/reader_cache.go +++ b/weed/filer/reader_cache.go @@ -46,14 +46,10 @@ func NewReaderCache(limit int, chunkCache chunk_cache.ChunkCache, lookupFileIdFn } } -func (rc *ReaderCache) MaybeCache(chunkViews *Interval[*ChunkView]) { - rc.MaybeCacheMany(chunkViews, 1) -} - -// MaybeCacheMany prefetches up to 'count' chunks ahead in parallel. +// MaybeCache prefetches up to 'count' chunks ahead in parallel. // This improves read throughput for sequential reads by keeping the // network pipeline full with parallel chunk fetches. -func (rc *ReaderCache) MaybeCacheMany(chunkViews *Interval[*ChunkView], count int) { +func (rc *ReaderCache) MaybeCache(chunkViews *Interval[*ChunkView], count int) { if rc.lookupFileIdFn == nil { return }