mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-30 18:16:39 +08:00
文件缓存增加自动限速/提升本地缓存数据库写入和查询速度
This commit is contained in:
@@ -127,8 +127,8 @@ func (this *FileWriter) Close() error {
|
||||
err = this.rawWriter.Close()
|
||||
if err != nil {
|
||||
_ = os.Remove(path)
|
||||
} else {
|
||||
err = os.Rename(path, strings.Replace(path, ".tmp", "", 1))
|
||||
} else if strings.HasSuffix(path, FileTmpSuffix) {
|
||||
err = os.Rename(path, strings.Replace(path, FileTmpSuffix, "", 1))
|
||||
if err != nil {
|
||||
_ = os.Remove(path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user