Skip to content

Commit fb35c44

Browse files
committed
feat(调整变量名称和导出):
1 parent 7af527d commit fb35c44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cache/redis_cache.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Redis from 'ioredis'
44

55
export const redisClient = BLOG.REDIS_URL ? new Redis(BLOG.REDIS_URL) : {}
66

7-
const cacheTime = Math.trunc(
7+
export const redisCacheTime = Math.trunc(
88
siteConfig('NEXT_REVALIDATE_SECOND', BLOG.NEXT_REVALIDATE_SECOND) * 1.5
99
)
1010

@@ -23,7 +23,7 @@ export async function setCache(key, data, customCacheTime) {
2323
key,
2424
JSON.stringify(data),
2525
'EX',
26-
customCacheTime || cacheTime
26+
customCacheTime || redisCacheTime
2727
)
2828
} catch (e) {
2929
console.error('redisClient写入失败 ' + e)

0 commit comments

Comments
 (0)