aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2016-04-15 12:06:43 -0700
committerchrislusf <chris.lu@gmail.com>2016-04-15 12:06:43 -0700
commit6dd257a81f3419ba5da4cc61919ae5c6fcd6bdb3 (patch)
treeee4176d79dc3c2f2df97ab19d73faaed10422e07
parentb03e7b26b53c2c579ae13755c3fac47f67c6f40c (diff)
downloadseaweedfs-6dd257a81f3419ba5da4cc61919ae5c6fcd6bdb3.tar.xz
seaweedfs-6dd257a81f3419ba5da4cc61919ae5c6fcd6bdb3.zip
adjust to real case cache size
-rw-r--r--go/storage/needle_byte_cache.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/go/storage/needle_byte_cache.go b/go/storage/needle_byte_cache.go
index c7781917e..24a72e244 100644
--- a/go/storage/needle_byte_cache.go
+++ b/go/storage/needle_byte_cache.go
@@ -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 caching, the string~[]byte mapping is cached, to
+In caching, the string~[]byte mapping is cached
*/
func init() {
bytesPool = util.NewBytesPool()
- bytesCache, _ = lru.NewWithEvict(1, func(key interface{}, value interface{}) {
+ bytesCache, _ = lru.NewWithEvict(512, func(key interface{}, value interface{}) {
value.(*Block).decreaseReference()
})
}