re-enable caching larger than 16MB

revert 62ce85610e
This commit is contained in:
Chris Lu 2020-10-03 14:12:38 -07:00
parent 2c20ef72ae
commit 707936f482

View file

@ -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)
}