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:
Jesse Rosenberger 2018-11-22 12:58:19 +02:00 committed by GitHub
parent 9beef0c43b
commit 87ff25b2df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,
});