mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-27 01:51:56 +08:00
Fix: failed unit test / Feat: support TTL in redis cache
This commit is contained in:
@@ -66,7 +66,7 @@ func (service *ItemService) Archive(ctx context.Context, c *gin.Context) seriali
|
||||
finalURL := siteURL.ResolveReference(signedURI).String()
|
||||
|
||||
// 将压缩文件记录存入缓存
|
||||
err = cache.Set("archive_"+zipID, zipFile)
|
||||
err = cache.Set("archive_"+zipID, zipFile, 120)
|
||||
if err != nil {
|
||||
return serializer.Err(serializer.CodeIOFailed, "无法写入缓存", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user