mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
生产环境打包速度
This commit is contained in:
2
lib/cache/cache_manager.js
vendored
2
lib/cache/cache_manager.js
vendored
@@ -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数据将被缓存
|
||||
|
||||
2
lib/cache/memory_cache.js
vendored
2
lib/cache/memory_cache.js
vendored
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user