mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-20 04:00:05 +08:00
增加文章缓存功能
This commit is contained in:
@@ -32,7 +32,7 @@ func (c *BlogController) Index() {
|
||||
}
|
||||
blogReadSession := fmt.Sprintf("blog:read:%d",blogId)
|
||||
|
||||
blog,err := models.NewBlog().Find(blogId)
|
||||
blog,err := models.NewBlog().FindFromCache(blogId)
|
||||
|
||||
if err != nil {
|
||||
c.ShowErrorPage(404,"文章不存在")
|
||||
|
||||
Reference in New Issue
Block a user