fix null cache type, close #1728 #1730

This commit is contained in:
DIYgod
2019-03-12 14:44:28 +08:00
parent 43c5c95690
commit 5eab3a4a69

View File

@@ -109,6 +109,11 @@ module.exports = function(app, options = {}) {
}
};
available = true;
} else {
app.context.cache = {
get: () => null,
set: () => null,
};
}
app.context.cache.tryGet = async function(key, getValueFunc, maxAge = 24 * 60 * 60) {