优化代码

This commit is contained in:
刘祥超
2022-01-11 16:02:41 +08:00
parent e23f4aaee2
commit 2f6414fc55
2 changed files with 6 additions and 11 deletions

View File

@@ -206,6 +206,7 @@ func (this *FileList) Add(hash string, item *Item) error {
return err
}
this.memoryCache.Write(hash, 1, item.ExpiredAt)
atomic.AddInt64(&this.total, 1)
if this.onAdd != nil {