Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

adjust to real case cache size

chrislusf6dd257a81f34
diff --git a/go/storage/needle_byte_cache.go b/go/storage/needle_byte_cache.go
index c7781917eb..24a72e2443 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()
})
}