We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2ecaeb7 + b15efa7 commit 4050da4Copy full SHA for 4050da4
index.js
@@ -2,15 +2,23 @@ const { Application } = require('probot')
2
const { resolve } = require('probot/lib/resolver')
3
const { findPrivateKey } = require('probot/lib/private-key')
4
const { template } = require('./views/probot')
5
+const cacheManager = require('cache-manager')
6
7
let app
8
let probot
9
+let cache
10
11
const loadProbot = (plugin) => {
12
+ cache = cache || cacheManager.caching({
13
+ store: 'memory',
14
+ ttl: 60 * 5 // 5 minutes
15
+ })
16
+
17
app = app || new Application({
18
id: process.env.APP_ID,
19
secret: process.env.WEBHOOK_SECRET,
- cert: findPrivateKey()
20
+ cert: findPrivateKey(),
21
+ cache
22
})
23
24
if (typeof plugin === 'string') {
0 commit comments