mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
Fix redis ttl error
This commit is contained in:
@@ -45,7 +45,7 @@ module.exports = function(options = {}) {
|
||||
if (key) {
|
||||
const value = await redisClient.get(key);
|
||||
if (value) {
|
||||
let ttl = redisClient.ttl(key);
|
||||
let ttl = await redisClient.ttl(key);
|
||||
ttl = ttl > expire ? ttl : expire * 2;
|
||||
await redisClient.setex(key, ttl, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user