生产环境打包速度

This commit is contained in:
tangly1024
2021-12-17 21:14:26 +08:00
parent d611814a27
commit 58f4fff45f
3 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import BLOG from '@/blog.config'
import { getCacheFromMemory, setCacheToMemory } from '@/lib/cache/memory_cache'
const enableCache = true && !BLOG.isProd // 生产环境禁用
const enableCache = true // 生产环境禁用
/**
* 为减少频繁接口请求notion数据将被缓存

View File

@@ -5,5 +5,5 @@ export async function getCacheFromMemory (key, options) {
}
export async function setCacheToMemory (key, data) {
await cache.put(key, data, 30 * 60 * 1000) // 30 minutes
await cache.put(key, data, 60 * 1000) // 1 minutes
}