Garbage Collection and Cache Eviction
Apollo Client 3 enables you to selectively remove cached data that is no longer useful. The default
garbage collection strategy of the
gc method is suitable for most applications, but the
method provides more fine-grained control for applications that require it.
You call these methods directly on the
InMemoryCache object, not on the
Please read the "Garbage collection and cache eviction" (opens in a new tab) chapter on Apollo Client documentation.