图片缓存不过期

This commit is contained in:
ryan
2026-06-11 15:57:31 +08:00
parent 1eef5336e3
commit f14875a8de
4 changed files with 77 additions and 8 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ func ServeUpload(c *gin.Context, upload *model.Upload) {
return
}
if err := cache.Set(cacheKey, webpBytes, 0); err != nil {
if err := cache.Set(cacheKey, webpBytes, diskcache.NoExpiration); err != nil {
logger.WarnF(c.Request.Context(), "failed to cache compressed image: %v", err)
}