Update lru-cache (main) (#206225)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| @​types/lru-cache | devDependencies | major | [`^5.1.0` ->
`^7.10.10`](https://renovatebot.com/diffs/npm/@types%2flru-cache/5.1.0/7.10.10)
|
| [lru-cache](https://redirect.github.com/isaacs/node-lru-cache) |
dependencies | major | [`^4.1.5` ->
`^11.0.2`](https://renovatebot.com/diffs/npm/lru-cache/4.1.5/11.0.2) |

---

### Release Notes

~Changelog~ _cringe lorg_ is here:
https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md

TL;DR:
* Named export
* Renamed some APIs (during 7.0):
https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md#70---2022-02
* TS is embedded now, so `@types/lru-cache` are not needed.

I'm addressing all these changes locally and will release the PR when
fixed.

<details>
<summary>isaacs/node-lru-cache (lru-cache)</summary>

###
[`v11.0.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v11.0.1...v11.0.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v11.0.1...v11.0.2)

###
[`v11.0.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v11.0.0...v11.0.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v11.0.0...v11.0.1)

###
[`v11.0.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.3...v11.0.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.3...v11.0.0)

###
[`v10.4.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.2...v10.4.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.2...v10.4.3)

###
[`v10.4.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.1...v10.4.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.1...v10.4.2)

###
[`v10.4.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.0...v10.4.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.4.0...v10.4.1)

###
[`v10.4.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.3.1...v10.4.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.3.1...v10.4.0)

###
[`v10.3.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.3.0...v10.3.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.3.0...v10.3.1)

###
[`v10.3.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.2.2...v10.3.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.2.2...v10.3.0)

###
[`v10.2.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.2.1...v10.2.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.2.1...v10.2.2)

###
[`v10.2.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.2.0...v10.2.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.2.0...v10.2.1)

###
[`v10.2.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.1.0...v10.2.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.1.0...v10.2.0)

###
[`v10.1.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.3...v10.1.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.3...v10.1.0)

###
[`v10.0.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.2...v10.0.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.2...v10.0.3)

###
[`v10.0.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.1...v10.0.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.1...v10.0.2)

###
[`v10.0.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.0...v10.0.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v10.0.0...v10.0.1)

###
[`v10.0.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.1.2...v10.0.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.1.2...v10.0.0)

###
[`v9.1.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.1.1...v9.1.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.1.1...v9.1.2)

###
[`v9.1.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.1.0...v9.1.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.1.0...v9.1.1)

###
[`v9.1.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.3...v9.1.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.3...v9.1.0)

###
[`v9.0.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.2...v9.0.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.2...v9.0.3)

###
[`v9.0.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.1...v9.0.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.1...v9.0.2)

###
[`v9.0.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.0...v9.0.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v9.0.0...v9.0.1)

###
[`v9.0.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.5...v9.0.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.5...v9.0.0)

###
[`v8.0.5`](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.4...v8.0.5)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.4...v8.0.5)

###
[`v8.0.4`](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.3...v8.0.4)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.3...v8.0.4)

###
[`v8.0.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.2...v8.0.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.2...v8.0.3)

###
[`v8.0.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.1...v8.0.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.1...v8.0.2)

###
[`v8.0.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.0...v8.0.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v8.0.0...v8.0.1)

###
[`v8.0.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.3...v8.0.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.3...v8.0.0)

###
[`v7.18.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.2...v7.18.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.2...v7.18.3)

###
[`v7.18.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.1...v7.18.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.1...v7.18.2)

###
[`v7.18.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.0...v7.18.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.18.0...v7.18.1)

###
[`v7.18.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.17.2...v7.18.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.17.2...v7.18.0)

###
[`v7.17.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.17.1...v7.17.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.17.1...v7.17.2)

###
[`v7.17.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.17.0...v7.17.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.17.0...v7.17.1)

###
[`v7.17.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.16.2...v7.17.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.16.2...v7.17.0)

###
[`v7.16.2`](https://redirect.github.com/isaacs/node-lru-cache/blob/HEAD/CHANGELOG.md#7162)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.16.1...v7.16.2)

-   Fail fetch() promises when they are aborted

###
[`v7.16.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.16.0...v7.16.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.16.0...v7.16.1)

###
[`v7.16.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.15.0...v7.16.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.15.0...v7.16.0)

###
[`v7.15.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.14.1...v7.15.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.14.1...v7.15.0)

###
[`v7.14.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.14.0...v7.14.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.14.0...v7.14.1)

###
[`v7.14.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.13.2...v7.14.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.13.2...v7.14.0)

###
[`v7.13.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.13.1...v7.13.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.13.1...v7.13.2)

###
[`v7.13.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.13.0...v7.13.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.13.0...v7.13.1)

###
[`v7.13.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.12.1...v7.13.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.12.1...v7.13.0)

###
[`v7.12.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.12.0...v7.12.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.12.0...v7.12.1)

###
[`v7.12.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.11.0...v7.12.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.11.0...v7.12.0)

###
[`v7.11.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.3...v7.11.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.3...v7.11.0)

###
[`v7.10.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.2...v7.10.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.2...v7.10.3)

###
[`v7.10.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.1...v7.10.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.1...v7.10.2)

###
[`v7.10.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.0...v7.10.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.10.0...v7.10.1)

###
[`v7.10.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.9.1...v7.10.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.9.1...v7.10.0)

###
[`v7.9.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.9.0...v7.9.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.9.0...v7.9.1)

###
[`v7.9.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.8.2...v7.9.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.8.2...v7.9.0)

###
[`v7.8.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.8.1...v7.8.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.8.1...v7.8.2)

###
[`v7.8.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.8.0...v7.8.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.8.0...v7.8.1)

###
[`v7.8.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.4...v7.8.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.4...v7.8.0)

###
[`v7.7.4`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.3...v7.7.4)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.3...v7.7.4)

###
[`v7.7.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.2...v7.7.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.2...v7.7.3)

###
[`v7.7.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.1...v7.7.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.1...v7.7.2)

###
[`v7.7.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.0...v7.7.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.7.0...v7.7.1)

###
[`v7.7.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.6.1...v7.7.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.6.1...v7.7.0)

###
[`v7.6.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.6.0...v7.6.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.6.0...v7.6.1)

###
[`v7.6.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.5.2...v7.6.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.5.2...v7.6.0)

###
[`v7.5.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.5.1...v7.5.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.5.1...v7.5.2)

###
[`v7.5.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.5.0...v7.5.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.5.0...v7.5.1)

###
[`v7.5.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.5...v7.5.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.5...v7.5.0)

###
[`v7.4.5`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.4...v7.4.5)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.4...v7.4.5)

###
[`v7.4.4`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.3...v7.4.4)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.3...v7.4.4)

###
[`v7.4.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.2...v7.4.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.2...v7.4.3)

###
[`v7.4.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.1...v7.4.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.1...v7.4.2)

###
[`v7.4.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.0...v7.4.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.4.0...v7.4.1)

###
[`v7.4.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.3...v7.4.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.3...v7.4.0)

###
[`v7.3.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.2...v7.3.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.2...v7.3.3)

###
[`v7.3.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.1...v7.3.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.1...v7.3.2)

###
[`v7.3.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.0...v7.3.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.3.0...v7.3.1)

###
[`v7.3.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.3...v7.3.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.3...v7.3.0)

###
[`v7.2.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.2...v7.2.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.2...v7.2.3)

###
[`v7.2.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.1...v7.2.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.1...v7.2.2)

###
[`v7.2.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.0...v7.2.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.2.0...v7.2.1)

###
[`v7.2.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.3...v7.2.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.3...v7.2.0)

###
[`v7.1.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.2...v7.1.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.2...v7.1.3)

###
[`v7.1.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.1...v7.1.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.1...v7.1.2)

###
[`v7.1.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.0...v7.1.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.1.0...v7.1.1)

###
[`v7.1.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.4...v7.1.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.4...v7.1.0)

###
[`v7.0.4`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.3...v7.0.4)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.3...v7.0.4)

###
[`v7.0.3`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.2...v7.0.3)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.2...v7.0.3)

###
[`v7.0.2`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.1...v7.0.2)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.1...v7.0.2)

###
[`v7.0.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.0...v7.0.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v7.0.0...v7.0.1)

###
[`v7.0.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v6.0.0...v7.0.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v6.0.0...v7.0.0)

###
[`v6.0.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.1.1...v6.0.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.1.1...v6.0.0)

###
[`v5.1.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.1.0...v5.1.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.1.0...v5.1.1)

###
[`v5.1.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.0.1...v5.1.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.0.1...v5.1.0)

###
[`v5.0.1`](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.0.0...v5.0.1)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v5.0.0...v5.0.1)

###
[`v5.0.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v4.1.5...v5.0.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v4.1.5...v5.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
This commit is contained in:
elastic-renovate-prod[bot] 2025-03-11 15:00:09 +01:00 committed by GitHub
parent c686695cdd
commit 45f19b769e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 41 additions and 49 deletions

View file

@ -1179,7 +1179,7 @@
"launchdarkly-js-client-sdk": "^3.5.0",
"load-json-file": "^6.2.0",
"lodash": "^4.17.21",
"lru-cache": "^4.1.5",
"lru-cache": "^11.0.2",
"lz-string": "^1.4.4",
"mapbox-gl-draw-rectangle-mode": "1.0.4",
"maplibre-gl": "5.1.1",
@ -1625,7 +1625,6 @@
"@types/license-checker": "15.0.0",
"@types/loader-utils": "^2.0.3",
"@types/lodash": "^4.17.14",
"@types/lru-cache": "^5.1.0",
"@types/lz-string": "^1.3.34",
"@types/mapbox__vector-tile": "1.3.0",
"@types/markdown-it": "^12.2.3",

View file

@ -684,8 +684,7 @@
{
"groupName": "lru-cache",
"matchDepNames": [
"lru-cache",
"@types/lru-cache"
"lru-cache"
],
"reviewers": [
"team:kibana-core"

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import LruCache from 'lru-cache';
import { LRUCache } from 'lru-cache';
/** @internal */
export interface IFileHashCache {
@ -20,10 +20,10 @@ export interface IFileHashCache {
/** @internal */
export class FileHashCache implements IFileHashCache {
private lru: LruCache<string, Promise<string>>;
private lru: LRUCache<string, Promise<string>>;
constructor(maxSize: number = 250) {
this.lru = new LruCache(maxSize);
constructor(maxItems: number = 250) {
this.lru = new LRUCache({ max: maxItems });
}
get(key: string) {
@ -35,6 +35,6 @@ export class FileHashCache implements IFileHashCache {
}
del(key: string) {
this.lru.del(key);
this.lru.delete(key);
}
}

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import LRUCache from 'lru-cache';
import { LRUCache } from 'lru-cache';
import type { ObjectMigrationDefinition } from '@kbn/object-versioning';
import type { ContentManagementServiceDefinitionVersioned, Version } from '@kbn/object-versioning';
import {

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import LRUCache from 'lru-cache';
import { LRUCache } from 'lru-cache';
import hash from 'object-hash';
import dateMath from '@kbn/datemath';
@ -37,7 +37,7 @@ export class OptionsListFetchCache {
constructor() {
this.cache = new LRUCache<string, OptionsListSuccessResponse>({
max: REQUEST_CACHE_SIZE,
maxAge: REQUEST_CACHE_TTL,
ttl: REQUEST_CACHE_TTL,
});
}
@ -123,6 +123,6 @@ export class OptionsListFetchCache {
}
public clearCache = () => {
this.cache.reset();
this.cache.clear();
};
}

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import LRUCache from 'lru-cache';
import { LRUCache } from 'lru-cache';
import type { DashboardGetOut } from '../../../server/content_management';
const DASHBOARD_CACHE_SIZE = 20; // only store a max of 20 dashboards
@ -19,7 +19,7 @@ export class DashboardContentManagementCache {
constructor() {
this.cache = new LRUCache<string, DashboardGetOut>({
max: DASHBOARD_CACHE_SIZE,
maxAge: DASHBOARD_CACHE_TTL,
ttl: DASHBOARD_CACHE_TTL,
});
}
@ -38,6 +38,6 @@ export class DashboardContentManagementCache {
/** Delete the dashboard with `id` from the cache */
public deleteDashboard(id: string) {
this.cache.del(id);
this.cache.delete(id);
}
}

View file

@ -12,22 +12,16 @@ import { CacheManager } from './cache_manager';
describe('CacheManager', () => {
const mockCacheKey = 'mock_key';
const mockCacheItem = 'cache_item';
const cacheDurationMs = 10000;
let mockNow: number;
const cacheDurationMs = 1000;
beforeEach(() => {
jest.useFakeTimers();
mockNow = jest.getRealSystemTime();
jest.setSystemTime(mockNow);
});
afterEach(() => jest.clearAllMocks());
afterAll(() => jest.useRealTimers());
it('caches object for the cache duration only', () => {
it('caches object for the cache duration only', async () => {
const cacheManager = new CacheManager({ cacheDurationMs });
cacheManager.setCache(mockCacheKey, mockCacheItem);
expect(cacheManager.getFromCache(mockCacheKey)).toEqual(mockCacheItem);
jest.advanceTimersByTime(cacheDurationMs + 100);
// Cannot get `jest.FakeTimers` to work with LRUCache
await new Promise((resolve) => setTimeout(resolve, cacheDurationMs + 100));
expect(cacheManager.getFromCache(mockCacheKey)).toEqual(undefined);
});

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import LRUCache from 'lru-cache';
import { LRUCache } from 'lru-cache';
export interface CacheManagerConfig {
// cache duration of objects in ms
@ -15,12 +15,12 @@ export interface CacheManagerConfig {
}
export class CacheManager {
private readonly cache: LRUCache<string, unknown>;
private readonly cache: LRUCache<string, {}>;
constructor({ cacheDurationMs }: CacheManagerConfig) {
this.cache = new LRUCache({
max: 1,
maxAge: cacheDurationMs,
ttl: cacheDurationMs,
});
}
@ -28,7 +28,7 @@ export class CacheManager {
* Cache an object by key
*/
public setCache = (cacheKey: string, data: unknown): void => {
this.cache.set(cacheKey, data);
this.cache.set(cacheKey, data as {});
};
/**
@ -42,6 +42,6 @@ export class CacheManager {
* Removes all cached objects
*/
public resetCache(): void {
this.cache.reset();
this.cache.clear();
}
}

View file

@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import LRUCache from 'lru-cache';
import { LRUCache } from 'lru-cache';
import hash from 'object-hash';
export interface IHashedCache<KeyType, ValueType> {
@ -14,10 +14,10 @@ export interface IHashedCache<KeyType, ValueType> {
reset(): void;
}
export class HashedCache<KeyType extends hash.NotUndefined, ValueType> {
export class HashedCache<KeyType extends hash.NotUndefined, ValueType extends {}> {
private cache: LRUCache<string, ValueType>;
constructor(options: LRUCache.Options<string, ValueType> = { max: 500 }) {
constructor(options: LRUCache.Options<string, ValueType, unknown> = { max: 500 }) {
this.cache = new LRUCache<string, ValueType>(options);
}
@ -37,7 +37,7 @@ export class HashedCache<KeyType extends hash.NotUndefined, ValueType> {
}
public reset() {
return this.cache.reset();
return this.cache.clear();
}
private getHashedKey(key: KeyType) {

View file

@ -7,7 +7,7 @@
import { AsyncLocalStorage } from 'async_hooks';
import LRUCache from 'lru-cache';
import { LRUCache } from 'lru-cache';
import type { AssetsMap, PackagePolicyAssetsMap } from '../../../../common/types';

View file

@ -7,7 +7,7 @@
import type { CoreSetup, CoreStart } from '@kbn/core/public';
import { isString, startsWith } from 'lodash';
import LRU from 'lru-cache';
import { LRUCache as LRU } from 'lru-cache';
import hash from 'object-hash';
import { enableInspectEsQueries } from '@kbn/observability-plugin/public';
import type { FetchOptions } from '../../../common/fetch_options';
@ -28,10 +28,10 @@ function fetchOptionsWithDebug(fetchOptions: FetchOptions, inspectableEsQueriesE
};
}
const cache = new LRU<string, any>({ max: 100, maxAge: 1000 * 60 * 60 });
const cache = new LRU<string, any>({ max: 100, ttl: 1000 * 60 * 60 });
export function clearCache() {
cache.reset();
cache.clear();
}
export type CallApi = typeof callApi;

View file

@ -6,7 +6,7 @@
*/
import { uniq } from 'lodash';
import LRU from 'lru-cache';
import { LRUCache as LRU } from 'lru-cache';
import type { MetricsExplorerRequestBody } from '../../../../common/http_api/metrics_explorer';
import { getDatasetForField } from './get_dataset_for_field';
import { calculateMetricInterval } from '../../../utils/calculate_metric_interval';
@ -14,7 +14,7 @@ import type { ESSearchClient } from '../../../lib/metrics/types';
const cache = new LRU({
max: 100,
maxAge: 15 * 60 * 1000,
ttl: 15 * 60 * 1000,
});
export const findIntervalForMetrics = async (

View file

@ -7,7 +7,7 @@
import { CoreSetup, CoreStart } from '@kbn/core/public';
import { isString, startsWith } from 'lodash';
import LRU from 'lru-cache';
import { LRUCache as LRU } from 'lru-cache';
import hash from 'object-hash';
import { enableInspectEsQueries } from '@kbn/observability-plugin/public';
import { FetchOptions } from '../../../common/fetch_options';
@ -28,10 +28,10 @@ function fetchOptionsWithDebug(fetchOptions: FetchOptions, inspectableEsQueriesE
};
}
const cache = new LRU<string, any>({ max: 100, maxAge: 1000 * 60 * 60 });
const cache = new LRU<string, any>({ max: 100, ttl: 1000 * 60 * 60 });
export function clearCache() {
cache.reset();
cache.clear();
}
export type CallApi = typeof callApi;

View file

@ -12180,11 +12180,6 @@
resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a"
integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==
"@types/lru-cache@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.0.tgz#57f228f2b80c046b4a1bd5cac031f81f207f4f03"
integrity sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w==
"@types/lz-string@^1.3.34":
version "1.3.34"
resolved "https://registry.yarnpkg.com/@types/lz-string/-/lz-string-1.3.34.tgz#69bfadde419314b4a374bf2c8e58659c035ed0a5"
@ -24282,6 +24277,11 @@ lru-cache@^10.2.0:
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119"
integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==
lru-cache@^11.0.2:
version "11.0.2"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.0.2.tgz#fbd8e7cf8211f5e7e5d91905c415a3f55755ca39"
integrity sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==
lru-cache@^4.1.5:
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"