chore(deps-dev): bump prettier from 1.19.1 to 2.0.2

This commit is contained in:
DIYgod
2020-04-02 21:21:46 +08:00
parent 27e4a7c151
commit 0e7b14e718
471 changed files with 1237 additions and 4457 deletions

View File

@@ -5,7 +5,7 @@ const md5 = require('@/utils/md5');
const config = require('@/config').value;
const logger = require('@/utils/logger');
module.exports = function(app, options = {}) {
module.exports = function (app, options = {}) {
let available = false;
const { prefix = 'koa-redis-cache:', expire = config.cache.routeExpire, passParam = '', maxLength = Infinity, ignoreQuery = true } = options;
@@ -43,7 +43,7 @@ module.exports = function(app, options = {}) {
return value;
}
},
set: function(key, value, maxAge = config.cache.contentExpire) {
set: function (key, value, maxAge = config.cache.contentExpire) {
if (!available) {
return;
}
@@ -127,7 +127,7 @@ module.exports = function(app, options = {}) {
};
}
app.context.cache.tryGet = async function(key, getValueFunc, maxAge = config.cache.contentExpire) {
app.context.cache.tryGet = async function (key, getValueFunc, maxAge = config.cache.contentExpire) {
let v = await this.get(key);
if (!v) {
v = await getValueFunc();