garbageCollect

suspend fun NormalizedCache.garbageCollect(maxAgeProvider: MaxAgeProvider, maxStale: Duration = Duration.ZERO, clock: () -> Long = { currentTimeMillis() }): GarbageCollectResult

Perform garbage collection on the cache.

This is a convenience method that calls removeStaleFields, removeDanglingReferences, and removeUnreachableRecords.

Parameters

maxAgeProvider

the max age provider to use for removeStaleFields

maxStale

the maximum staleness to use for removeStaleFields


suspend fun ApolloStore.garbageCollect(maxAgeProvider: MaxAgeProvider, maxStale: Duration = Duration.ZERO): GarbageCollectResult

Perform garbage collection on the store.

See also