Skip to content

Commit f73bedf

Browse files
committed
chore: add lru-cache dependency
1 parent 7d2f70b commit f73bedf

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

lib/proxy.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import cluster from 'cluster';
1212
import hash from 'object-hash';
1313
import safe from 'safetimeout';
1414
import * as letsencrypt from './letsencrypt.mjs';
15+
import { LRUCache } from 'lru-cache';
16+
17+
const routeCache = new LRUCache({ max: 5000 });
1518

1619
import tls from 'tls';
1720

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"le-challenge-fs": "^2.0.9",
3535
"le-store-certbot": "^2.2.3",
3636
"lodash": "^4.17.15",
37+
"lru-cache": "^11.0.1",
3738
"node-etcd": "^7.0.0",
3839
"object-hash": "^1.3.1",
3940
"pino": "^9.4.0",

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -1971,6 +1971,11 @@ lru-cache@2:
19711971
resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz"
19721972
integrity sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=
19731973

1974+
lru-cache@^11.0.1:
1975+
version "11.0.1"
1976+
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.0.1.tgz#3a732fbfedb82c5ba7bca6564ad3f42afcb6e147"
1977+
integrity sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==
1978+
19741979
magic-string@^0.30.10:
19751980
version "0.30.11"
19761981
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.11.tgz#301a6f93b3e8c2cb13ac1a7a673492c0dfd12954"

0 commit comments

Comments
 (0)