Garbage Collection and Cache Eviction

Learn how to manage cached data in Apollo Client 3 with garbage collection and cache eviction strategies, and gain fine-grained control with the evict method. Read more on the documentation.

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 evict method provides more fine-grained control for applications that require it.

Please read the “Garbage collection and cache eviction” chapter on Apollo Client documentation.