mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-07 13:39:35 +08:00
chore(deps-dev): bump prettier from 1.19.1 to 2.0.2
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user