初步实验使用KV数据库(pebble)存储缓存索引

This commit is contained in:
GoEdgeLab
2024-03-24 11:25:35 +08:00
parent f4c4a2d5fa
commit 83a086f67f
36 changed files with 4564 additions and 21 deletions

View File

@@ -22,13 +22,14 @@ type Item struct {
Type ItemType `json:"-"`
Key string `json:"1,omitempty"`
ExpiresAt int64 `json:"2,omitempty"`
StaleAt int64 `json:"-"`
StaleAt int64 `json:"3,omitempty"`
HeaderSize int64 `json:"-"`
BodySize int64 `json:"-"`
BodySize int64 `json:"4,omitempty"`
MetaSize int64 `json:"-"`
Host string `json:"-"` // 主机名
ServerId int64 `json:"3,omitempty"` // 服务ID
Host string `json:"-"` // 主机名
ServerId int64 `json:"5,omitempty"` // 服务ID
Week int32 `json:"-"`
CreatedAt int64 `json:"6,omitempty"`
}
func (this *Item) IsExpired() bool {