log: repeated key

This commit is contained in:
DIYgod
2019-03-27 17:53:16 +08:00
parent 6cf68e6044
commit a21fc4bbc6
+3
View File
@@ -44,6 +44,9 @@ module.exports = function(app, options = {}) {
}
},
set: async (key, value, maxAge = 24 * 60 * 60) => {
if (await this.get(key)) {
logger.warn('repeated key: ', key);
}
if (!value || value === 'undefined') {
value = '';
}