fix default value of cache maxAge

This commit is contained in:
DIYgod 2019-03-06 12:17:33 +08:00
parent dc903ab7da
commit 0ca946c705
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ module.exports = function(app, options = {}) {
return value;
}
},
set: async (key, value, maxAge) => {
set: async (key, value, maxAge = 24 * 60 * 60) => {
if (!value || value === 'undefined') {
value = '';
}
@ -80,7 +80,7 @@ module.exports = function(app, options = {}) {
return routeCache.get(key);
}
},
set: (key, value, maxAge) => {
set: (key, value, maxAge = 24 * 60 * 60) => {
if (!value || value === 'undefined') {
value = '';
}