Skip to content

Commit

Permalink
Instantiate lru-cache class using new in InMemoryLRUCache. (#2007)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abernix authored Nov 22, 2018
1 parent 9beef0c commit 87ff25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/apollo-server-caching/src/InMemoryLRUCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit 87ff25b

Please sign in to comment.