优化热门缓存算法

This commit is contained in:
GoEdgeLab
2023-10-02 10:40:20 +08:00
parent 42150681d0
commit a8ab2c123b

View File

@@ -1170,6 +1170,9 @@ func (this *FileStorage) hotLoop() {
var result = []*HotItem{} // [ {key: ..., hits: ...}, ... ]
for _, v := range this.hotMap {
if v.Hits <= 1 {
continue
}
result = append(result, v)
}