Skip to content

Commit

Permalink
feat(调整变量名称和导出):
Browse files Browse the repository at this point in the history
  • Loading branch information
qixing-jk committed Jan 11, 2025
1 parent 7af527d commit fb35c44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cache/redis_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Redis from 'ioredis'

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

const cacheTime = Math.trunc(
export const redisCacheTime = Math.trunc(
siteConfig('NEXT_REVALIDATE_SECOND', BLOG.NEXT_REVALIDATE_SECOND) * 1.5
)

Expand All @@ -23,7 +23,7 @@ export async function setCache(key, data, customCacheTime) {
key,
JSON.stringify(data),
'EX',
customCacheTime || cacheTime
customCacheTime || redisCacheTime
)
} catch (e) {
console.error('redisClient写入失败 ' + e)
Expand Down

0 comments on commit fb35c44

Please sign in to comment.