mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-03-04 22:35:39 +08:00
实现缓存策略的部分功能
This commit is contained in:
14
internal/caches/item.go
Normal file
14
internal/caches/item.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package caches
|
||||
|
||||
import "time"
|
||||
|
||||
type Item struct {
|
||||
Key string
|
||||
ExpiredAt int64
|
||||
ValueSize int64
|
||||
Size int64
|
||||
}
|
||||
|
||||
func (this *Item) IsExpired() bool {
|
||||
return this.ExpiredAt < time.Now().Unix()
|
||||
}
|
||||
Reference in New Issue
Block a user