mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-29 11:40:24 +08:00
改进缓存LFU算法
This commit is contained in:
@@ -107,6 +107,12 @@ func (this *FileListHashMap) IsReady() bool {
|
||||
return this.isReady
|
||||
}
|
||||
|
||||
func (this *FileListHashMap) Len() int {
|
||||
this.locker.Lock()
|
||||
defer this.locker.Unlock()
|
||||
return len(this.m)
|
||||
}
|
||||
|
||||
func (this *FileListHashMap) bigInt(hash string) uint64 {
|
||||
var bigInt = big.NewInt(0)
|
||||
bigInt.SetString(hash, 16)
|
||||
|
||||
Reference in New Issue
Block a user