mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2026-11-11 06:29:28 +00:00
Fix: failed unit test / Feat: support TTL in redis cache
This commit is contained in:
1 parent
8703f97e20
commit
afc0b647ca
14 files changed
+78
-369
No files matched your search
@@ -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