mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-03 04:26:35 +08:00
优化代码:使用fasttime取代以往的utils.UnixTime
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user