mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 15:21:59 +08:00
avoid repeating setting cache
This commit is contained in:
@@ -43,7 +43,11 @@ module.exports = function(app, options = {}) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
set: async (key, value, maxAge = 24 * 60 * 60) => {
|
set: async function(key, value, maxAge = 24 * 60 * 60) {
|
||||||
|
if (await redisClient.exists(key)) {
|
||||||
|
logger.warn(`repeated key: ${key}, ${value}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!value || value === 'undefined') {
|
if (!value || value === 'undefined') {
|
||||||
value = '';
|
value = '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user