mirror of
https://github.com/vale981/apollo-server
synced 2025-03-05 09:41:40 -05:00
Instantiate lru-cache
class using new
in InMemoryLRUCache
. (#2007)
This is mandated by `lru-cache` v5 and surfaced the CircleCI failures on #2004: https://circleci.com/gh/apollographql/apollo-server/22537 Luckily, this is a private implementation detail of Apollo Server's `InMemoryLRUCache` so no additional changes should be necessary and we should be able to update to `lru-cache` 5.0.0 in a semver minor respectful way.
This commit is contained in:
parent
9beef0c43b
commit
87ff25b2df
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ export class InMemoryLRUCache implements KeyValueCache {
|
|||
|
||||
// FIXME: Define reasonable default max size of the cache
|
||||
constructor({ maxSize = Infinity }: { maxSize?: number } = {}) {
|
||||
this.store = LRU({
|
||||
this.store = new LRU({
|
||||
max: maxSize,
|
||||
length: item => item.length,
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue