优化代码

This commit is contained in:
GoEdgeLab
2024-04-15 08:42:33 +08:00
parent 0c54cd2f89
commit 21d11e9c9a
4 changed files with 10 additions and 4 deletions

View File

@@ -560,6 +560,11 @@ func (this *MemoryStorage) flushItem(fullKey string) {
if !isInList {
for i := 0; i < 1000; i++ {
isInList, _, err = this.list.Exist(types.String(hash))
if err != nil {
remotelogs.Error("CACHE", "flush items failed: "+err.Error())
time.Sleep(1 * time.Second)
continue
}
if isInList {
break
}