update no cache

This commit is contained in:
aichy126 2022-12-13 16:28:47 +08:00
parent 3cc7f9fbb0
commit 99427afa30
1 changed files with 2 additions and 2 deletions

View File

@ -72,8 +72,8 @@ func (t *TemplateRenderController) SitemapPage(ctx *gin.Context, page int) error
cachekey := fmt.Sprintf(schema.SitemapPageCachekey, page)
infoStr, err := t.data.Cache.GetString(ctx, cachekey)
if err != nil {
log.Errorf("get Cache failed: %s", err)
return err
//If there is no cache, return directly.
return nil
}
if err = json.Unmarshal([]byte(infoStr), sitemapInfo); err != nil {
log.Errorf("get sitemap info failed: %s", err)