mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
app: expose cache function to koa context
This commit is contained in:
@@ -55,6 +55,7 @@ app.use(filter);
|
||||
if (config.cacheType === 'memory') {
|
||||
app.use(
|
||||
memoryCache({
|
||||
app: app,
|
||||
expire: config.cacheExpire,
|
||||
ignoreQuery: true,
|
||||
})
|
||||
@@ -62,6 +63,7 @@ if (config.cacheType === 'memory') {
|
||||
} else if (config.cacheType === 'redis') {
|
||||
app.use(
|
||||
redisCache({
|
||||
app: app,
|
||||
expire: config.cacheExpire,
|
||||
ignoreQuery: true,
|
||||
redis: config.redis,
|
||||
|
||||
Reference in New Issue
Block a user