From 9d8c3f39ac3bb628c3bf181dd30095234bb650e0 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 28 Jun 2021 16:47:59 -0400 Subject: [PATCH] Fix comments still mentioning cache.gc({ preserveCanon }). --- src/cache/inmemory/__tests__/cache.ts | 2 +- src/cache/inmemory/__tests__/entityStore.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cache/inmemory/__tests__/cache.ts b/src/cache/inmemory/__tests__/cache.ts index d44eec76d8e..809786a20d9 100644 --- a/src/cache/inmemory/__tests__/cache.ts +++ b/src/cache/inmemory/__tests__/cache.ts @@ -1378,7 +1378,7 @@ describe('Cache', () => { expect(originalWriter).not.toBe(cache["storeWriter"]); expect(originalMBW).not.toBe(cache["maybeBroadcastWatch"]); // The cache.storeReader.canon is preserved by default, but can be dropped - // by passing preserveCanon:false to cache.gc. + // by passing resetResultIdentities:true to cache.gc. expect(originalCanon).toBe(cache["storeReader"].canon); }); }); diff --git a/src/cache/inmemory/__tests__/entityStore.ts b/src/cache/inmemory/__tests__/entityStore.ts index fd92516f5cc..7a57ab251c4 100644 --- a/src/cache/inmemory/__tests__/entityStore.ts +++ b/src/cache/inmemory/__tests__/entityStore.ts @@ -220,8 +220,8 @@ describe('EntityStore', () => { const resultAfterFullGC = cache.readQuery({ query }); expect(resultAfterFullGC).toEqual(resultBeforeGC); expect(resultAfterFullGC).toEqual(resultAfterGC); - // These !== relations are triggered by the preserveCanon:false option - // passed to cache.gc, above. + // These !== relations are triggered by passing resetResultIdentities:true + // to cache.gc, above. expect(resultAfterFullGC).not.toBe(resultBeforeGC); expect(resultAfterFullGC).not.toBe(resultAfterGC); // Result caching immediately begins working again after the intial reset.