gcache icon indicating copy to clipboard operation
gcache copied to clipboard

问下啊,初始化的size参数单位是缓存个数还是容量啊

Open ayamzh opened this issue 4 years ago • 3 comments

问下啊,初始化的size参数单位是缓存个数还是容量啊

ayamzh avatar Mar 26 '21 02:03 ayamzh

Although we are both Chinese, we can hardly get answers to questions in Chinese

TracyBin avatar Apr 14 '21 07:04 TracyBin

i have the same problem, what's means of the size when call gcache.New() func file capacities or cache count? if file capacities, which kind unit of it? b or kb or the others?

susnow avatar Apr 16 '21 08:04 susnow

I recently read the source code. There is a linked list inside. This size represents the size of the linked list, which is the size of the key that can be cached.When the number of cached keys is greater than size, the eviction strategy is triggered

问下啊,初始化的size参数单位是缓存个数还是容量啊

TracyBin avatar Apr 21 '21 09:04 TracyBin

缓存个数! 图片

pakano avatar Nov 01 '22 09:11 pakano