mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-13 23:10:25 +08:00
优化内存缓存写入速度
This commit is contained in:
@@ -48,6 +48,10 @@ func NewMemoryWriter(memoryStorage *MemoryStorage, key string, expiredAt int64,
|
|||||||
SharedFragmentMemoryPool.IncreaseNew()
|
SharedFragmentMemoryPool.IncreaseNew()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if expectedBodySize > 0 {
|
||||||
|
valueItem.BodyValue = make([]byte, 0, expectedBodySize)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var w = &MemoryWriter{
|
var w = &MemoryWriter{
|
||||||
storage: memoryStorage,
|
storage: memoryStorage,
|
||||||
|
|||||||
Reference in New Issue
Block a user