优化代码:使用fasttime取代以往的utils.UnixTime

This commit is contained in:
GoEdgeLab
2023-04-08 12:47:04 +08:00
parent 511e0d409f
commit f3da37046a
22 changed files with 208 additions and 137 deletions

View File

@@ -1,7 +1,7 @@
package caches
import (
"github.com/TeaOSLab/EdgeNode/internal/utils"
"github.com/TeaOSLab/EdgeNode/internal/utils/fasttime"
"strings"
"time"
)
@@ -36,7 +36,7 @@ type Item struct {
}
func (this *Item) IsExpired() bool {
return this.ExpiredAt < utils.UnixTime()
return this.ExpiredAt < fasttime.Now().Unix()
}
func (this *Item) TotalSize() int64 {