Skip to content

Commit 6a3a886

Browse files
deps: bump lru-cache from 6.0.0 to 7.5.1 (#77)
* deps: bump lru-cache from 6.0.0 to 7.5.1 Bumps [lru-cache](https://github.com/isaacs/node-lru-cache) from 6.0.0 to 7.5.1. - [Release notes](https://github.com/isaacs/node-lru-cache/releases) - [Changelog](https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md) - [Commits](isaacs/node-lru-cache@v6.0.0...v7.5.1) --- updated-dependencies: - dependency-name: lru-cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix: use lru-cache@7 constructor options Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gar <[email protected]>
1 parent 954a430 commit 6a3a886

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Diff for: lib/memoization.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
const LRU = require('lru-cache')
44

5-
const MAX_SIZE = 50 * 1024 * 1024 // 50MB
6-
const MAX_AGE = 3 * 60 * 1000
7-
85
const MEMOIZED = new LRU({
9-
max: MAX_SIZE,
10-
maxAge: MAX_AGE,
11-
length: (entry, key) => key.startsWith('key:') ? entry.data.length : entry.length,
6+
max: 500,
7+
maxSize: 50 * 1024 * 1024, // 50MB
8+
ttl: 3 * 60 * 1000, // 3 minutes
9+
sizeCalculation: (entry, key) => key.startsWith('key:') ? entry.data.length : entry.length,
1210
})
1311

1412
module.exports.clearMemoized = clearMemoized

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"fs-minipass": "^2.1.0",
5353
"glob": "^7.1.4",
5454
"infer-owner": "^1.0.4",
55-
"lru-cache": "^6.0.0",
55+
"lru-cache": "^7.5.1",
5656
"minipass": "^3.1.6",
5757
"minipass-collect": "^1.0.2",
5858
"minipass-flush": "^1.0.5",

0 commit comments

Comments
 (0)