Skip to content

Commit

Permalink
add comment about garbage collection to StoreReader
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Nov 20, 2023
1 parent 3512f38 commit 371232d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cache/inmemory/readFromStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export class StoreReader {

this.canon = config.canon || new ObjectCanon();

// memoized functions in this class will be "garbage-collected"
// by recreating the whole `StoreReader` in
// `InMemoryCache.resetResultsCache`
// (triggered from `InMemoryCache.gc` with `resetResultCache: true`)
this.executeSelectionSet = wrap(
(options) => {
const { canonizeResults } = options.context;
Expand Down

0 comments on commit 371232d

Please sign in to comment.