f
This commit is contained in:
@@ -826,7 +826,7 @@ func (h *ProductHandler) DownloadProductDocumentation(c *gin.Context) {
|
||||
|
||||
if h.pdfCacheManager != nil {
|
||||
var cacheErr error
|
||||
pdfBytes, cacheHit, cacheErr = h.pdfCacheManager.Get(productID, docVersion)
|
||||
pdfBytes, cacheHit, cacheErr = h.pdfCacheManager.GetByProduct(productID, docVersion)
|
||||
if cacheErr != nil {
|
||||
h.logger.Warn("从缓存获取PDF失败,将重新生成",
|
||||
zap.String("product_id", productID),
|
||||
@@ -972,7 +972,7 @@ func (h *ProductHandler) DownloadProductDocumentation(c *gin.Context) {
|
||||
// 保存到缓存(异步,不阻塞响应)
|
||||
if h.pdfCacheManager != nil {
|
||||
go func() {
|
||||
if err := h.pdfCacheManager.Set(productID, docVersion, pdfBytes); err != nil {
|
||||
if err := h.pdfCacheManager.SetByProduct(productID, docVersion, pdfBytes); err != nil {
|
||||
h.logger.Warn("保存PDF到缓存失败",
|
||||
zap.String("product_id", productID),
|
||||
zap.String("version", docVersion),
|
||||
|
||||
Reference in New Issue
Block a user