mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-07 10:40:26 +08:00
修复内存缓存没有init()的Bug
This commit is contained in:
@@ -46,6 +46,8 @@ func NewMemoryStorage(policy *serverconfigs.HTTPCachePolicy) *MemoryStorage {
|
|||||||
|
|
||||||
// Init 初始化
|
// Init 初始化
|
||||||
func (this *MemoryStorage) Init() error {
|
func (this *MemoryStorage) Init() error {
|
||||||
|
_ = this.list.Init()
|
||||||
|
|
||||||
this.list.OnAdd(func(item *Item) {
|
this.list.OnAdd(func(item *Item) {
|
||||||
atomic.AddInt64(&this.totalSize, item.TotalSize())
|
atomic.AddInt64(&this.totalSize, item.TotalSize())
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user