Skip to content

Commit bf96d1f

Browse files
committed
update deps, add comments
1 parent 955130d commit bf96d1f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@
6262
"devDependencies": {
6363
"@sinonjs/fake-timers": "^8.1.0",
6464
"@tsconfig/node12": "^1.0.9",
65-
"@types/node": "^14.17.3",
66-
"@types/sinonjs__fake-timers": "^8.1.0",
6765
"@types/node": "^17.0.5",
66+
"@types/sinonjs__fake-timers": "^8.1.1",
6867
"abort-controller": "^3.0.0",
6968
"apollo-datasource-rest": "^3.4.0",
7069
"ava": "^3.15.0",

src/http-data-source.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ export abstract class HTTPDataSource<TContext = any> extends DataSource {
9292
constructor(public readonly baseURL: string, private readonly options?: HTTPDataSourceOptions) {
9393
super()
9494
this.memoizedResults = new QuickLRU({
95+
// The maximum number of items before evicting the least recently used items.
9596
maxSize: this.options?.lru?.maxSize ? this.options.lru.maxSize : 100,
97+
// The maximum number of milliseconds an item should remain in cache.
98+
// By default maxAge will be Infinity, which means that items will never expire.
9699
maxAge: this.options?.lru?.maxAge,
97100
})
98101
this.pool = options?.pool ?? new Pool(this.baseURL, options?.clientOptions)

0 commit comments

Comments
 (0)