mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
adjust to real case cache size
This commit is contained in:
parent
b03e7b26b5
commit
6dd257a81f
|
@ -20,11 +20,11 @@ There are one level of caching, and one level of pooling.
|
||||||
|
|
||||||
In pooling, all []byte are fetched and returned to the pool bytesPool.
|
In pooling, all []byte are fetched and returned to the pool bytesPool.
|
||||||
|
|
||||||
In caching, the string~[]byte mapping is cached, to
|
In caching, the string~[]byte mapping is cached
|
||||||
*/
|
*/
|
||||||
func init() {
|
func init() {
|
||||||
bytesPool = util.NewBytesPool()
|
bytesPool = util.NewBytesPool()
|
||||||
bytesCache, _ = lru.NewWithEvict(1, func(key interface{}, value interface{}) {
|
bytesCache, _ = lru.NewWithEvict(512, func(key interface{}, value interface{}) {
|
||||||
value.(*Block).decreaseReference()
|
value.(*Block).decreaseReference()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue