mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-03 15:00:26 +08:00
实现缓存策略最大容量
This commit is contained in:
@@ -43,6 +43,7 @@ func (this *MemoryWriter) Write(data []byte) (n int, err error) {
|
||||
item.Value = append([]byte{}, data...)
|
||||
item.ExpiredAt = this.expiredAt
|
||||
this.m[hash] = item
|
||||
this.isFirstWriting = false
|
||||
}
|
||||
this.locker.Unlock()
|
||||
return len(data), nil
|
||||
|
||||
Reference in New Issue
Block a user