mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 07:26:46 +00:00
缓存相关代码整合
This commit is contained in:
5
lib/cache/redis_cache.js
vendored
5
lib/cache/redis_cache.js
vendored
@@ -1,8 +1,9 @@
|
||||
import Redis from 'ioredis'
|
||||
import BLOG from '@/blog.config'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import Redis from 'ioredis'
|
||||
|
||||
export const redisClient = BLOG.REDIS_URL ? new Redis(BLOG.REDIS_URL) : {}
|
||||
|
||||
export const redisClient = new Redis(BLOG.REDIS_URL)
|
||||
const cacheTime = Math.trunc(
|
||||
siteConfig('NEXT_REVALIDATE_SECOND', BLOG.NEXT_REVALIDATE_SECOND) * 1.5
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user