feat: let the summary not expire
This commit is contained in:
parent
b41fe03409
commit
c7fb4966bd
|
|
@ -53,7 +53,11 @@ export async function cacheGet(options: {
|
|||
return JSON.parse(cacheValue)
|
||||
} else {
|
||||
const value = await options.getValueFun()
|
||||
redis.set(redisKey, JSON.stringify(value), "EX", REDIS_EXPIRE)
|
||||
if (options.noUpdate) {
|
||||
redis.set(redisKey, JSON.stringify(value))
|
||||
} else {
|
||||
redis.set(redisKey, JSON.stringify(value), "EX", REDIS_EXPIRE)
|
||||
}
|
||||
return value
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue