Browse Source

re-enable caching larger than 16MB

revert 62ce85610e
pull/1508/head
Chris Lu 4 years ago
parent
commit
707936f482
  1. 4
      weed/util/chunk_cache/chunk_cache.go

4
weed/util/chunk_cache/chunk_cache.go

@ -76,7 +76,7 @@ func (c *TieredChunkCache) doGetChunk(fileId string, minSize uint64) (data []byt
return data
}
}
if minSize <= c.onDiskCacheSizeLimit2 {
{
data = c.diskCaches[2].getChunk(fid.Key)
if len(data) >= int(minSize) {
return data
@ -115,7 +115,7 @@ func (c *TieredChunkCache) doSetChunk(fileId string, data []byte) {
c.diskCaches[0].setChunk(fid.Key, data)
} else if len(data) <= int(c.onDiskCacheSizeLimit1) {
c.diskCaches[1].setChunk(fid.Key, data)
} else if len(data) <= int(c.onDiskCacheSizeLimit2) {
} else {
c.diskCaches[2].setChunk(fid.Key, data)
}

Loading…
Cancel
Save