app: unify cache set to seconds value

This commit is contained in:
DIYgod
2018-05-18 11:30:29 +08:00
parent c46468231e
commit 405c2bfd12
+1 -1
View File
@@ -23,7 +23,7 @@ module.exports = function(options = {}) {
options.app.context.cache = {
get: (key) => memoryCache.get(key),
set: (key, value, maxAge) => memoryCache.set(key, value, maxAge),
set: (key, value, maxAge) => memoryCache.set(key, value, maxAge * 1000),
};
return async function cache(ctx, next) {