Skip to content

Commit 3a81c23

Browse files
committed
perfect:缓存中间件使用协程进行更新缓存
1 parent 288d548 commit 3a81c23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

middleware/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func Cache() gin.HandlerFunc {
6868
Header: ctx.Writer.Header().Clone(),
6969
Body: customWirter.body.Bytes(),
7070
}
71-
globle.GlobleCache.UpdateCache("GIN-Cache", cacheKey, responseCacheData, cacheDuration)
71+
go globle.GlobleCache.UpdateCache("GIN-Cache", cacheKey, responseCacheData, cacheDuration)
7272
}
7373
}
7474
}

0 commit comments

Comments
 (0)