开发环境缓存

This commit is contained in:
tangly1024
2022-01-04 12:29:27 +08:00
parent 0860c1633b
commit 4e6df31f08

View File

@@ -1,7 +1,7 @@
import cache from 'memory-cache'
import BLOG from 'blog.config'
const cacheTime = BLOG.isProd ? 60 : 60 * 60
const cacheTime = BLOG.isProd ? 10 : 120 * 60 // 120 minutes for dev,10 minutes for prod
export async function getCacheFromMemory (key, options) {
return cache.get(key)