Add cacheable-lookup

This commit is contained in:
Louis Lam 2022-06-29 22:17:47 +08:00
parent dddd2c0042
commit e5e8db6c38
3 changed files with 20 additions and 0 deletions

View file

@ -7,6 +7,7 @@ const { R } = require("redbean-node");
const { log } = require("../src/util");
const Database = require("./database");
const util = require("util");
const CacheableLookup = require("cacheable-lookup");
/**
* `module.exports` (alias: `server`) should be inside this class, in order to avoid circular dependency issue.
@ -71,6 +72,10 @@ class UptimeKumaServer {
}
}
const cacheable = new CacheableLookup();
cacheable.install(http.globalAgent);
cacheable.install(https.globalAgent);
this.io = new Server(this.httpServer);
}