优化文件缓存

This commit is contained in:
GoEdgeLab
2021-06-13 17:37:57 +08:00
parent 117bcaaf0a
commit 468af65edd
11 changed files with 309 additions and 101 deletions

View File

@@ -82,7 +82,7 @@ func (this *MemoryWriter) Close() error {
func (this *MemoryWriter) Discard() error {
// 需要在Locker之外
defer this.endFunc()
this.locker.Lock()
delete(this.m, this.hash)
this.locker.Unlock()