diff --git a/components/SideArea.js b/components/SideArea.js
index 9d9e4473..d39b160a 100644
--- a/components/SideArea.js
+++ b/components/SideArea.js
@@ -52,17 +52,6 @@ const SideArea = ({ title, tags, currentTag, post, posts, categories, currentCat
)}
-
-
{/* 分类 */}
{categories && (
@@ -94,6 +83,17 @@ const SideArea = ({ title, tags, currentTag, post, posts, categories, currentCat
)}
+
+
{post && post.toc && post.toc.length > 1 && (
diff --git a/lib/cache/cache_manager.js b/lib/cache/cache_manager.js
index 24bf33ae..045b5abd 100644
--- a/lib/cache/cache_manager.js
+++ b/lib/cache/cache_manager.js
@@ -1,4 +1,3 @@
-import BLOG from '@/blog.config'
import { getCacheFromMemory, setCacheToMemory } from '@/lib/cache/memory_cache'
const enableCache = true // 生产环境禁用
diff --git a/lib/cache/memory_cache.js b/lib/cache/memory_cache.js
index ce107e0c..973225a0 100644
--- a/lib/cache/memory_cache.js
+++ b/lib/cache/memory_cache.js
@@ -1,9 +1,12 @@
import cache from 'memory-cache'
+import BLOG from 'blog.config'
+
+const cacheTime = BLOG.isProd ? 60 : 60 * 60
export async function getCacheFromMemory (key, options) {
return cache.get(key)
}
export async function setCacheToMemory (key, data) {
- await cache.put(key, data, 60 * 1000) // 1 minutes
+ await cache.put(key, data, cacheTime * 1000)
}