feat:优化

This commit is contained in:
2026-03-05 21:22:27 +08:00
parent c07a61c424
commit e046335900
2 changed files with 146 additions and 202 deletions

View File

@@ -336,7 +336,8 @@ public class TikUserFileServiceImpl implements TikUserFileService {
throw exception(FILE_CATEGORY_INVALID, "文件不是视频类型");
}
return getCachedPresignUrl(file.getFileUrl(), PRESIGN_URL_EXPIRATION_SECONDS);
// 视频播放URL不缓存每次都生成新的签名URL
return fileApi.presignGetUrl(file.getFileUrl(), PRESIGN_URL_EXPIRATION_SECONDS);
}
@Override
@@ -347,7 +348,8 @@ public class TikUserFileServiceImpl implements TikUserFileService {
throw exception(FILE_CATEGORY_INVALID, "文件不是音频类型");
}
return getCachedPresignUrl(file.getFileUrl(), PRESIGN_URL_EXPIRATION_SECONDS);
// 音频播放URL不缓存每次都生成新的签名URL
return fileApi.presignGetUrl(file.getFileUrl(), PRESIGN_URL_EXPIRATION_SECONDS);
}
@Override