SwrCache
Implementation of the SwrClient interface.
Query internally manages two categories:
Active: When there is one or more references or within the QueryOptions.keepAliveTime period
Inactive: When there are no references and past the QueryOptions.keepAliveTime period
Query in the Active state does not disappear from memory unless one of the following conditions is met:
removeQueries is explicitly called
On the other hand, Query in the Inactive state gradually disappears from memory when one of the following conditions is met:
Exceeds the maximum retention count of TimeBasedCache
Past the QueryOptions.gcTime period since saved in TimeBasedCache
gc is executed for unnecessary memory release
Mutation is managed similarly to Active state Query, but it is not explicitly deleted like removeQueries. Typically, since the result of Mutation execution is not reused, it does not cache after going inactive.
Parameters
The policy for the SwrCache.
Inheritors
Constructors
Creates a new SwrCache instance.
Properties
Functions
Releases data in memory based on the specified level.
Gets the InfiniteQueryRef by the specified InfiniteQueryKey.
Retrieves data of the InfiniteQueryKey associated with the id.
Gets the MutationRef by the specified MutationKey.
Invalidates the queries by the specified InvalidateQueriesFilter.
Invalidates the queries by the specified UniqueId.
Executes side effects for queries.
Prefetches the infinite query by the specified InfiniteQueryKey.
Removes the queries by the specified RemoveQueriesFilter.
Removes the queries by the specified UniqueId.
Resumes the queries by the specified ResumeQueriesFilter.
Resumes the queries by the specified UniqueId.
Updates the data of the InfiniteQueryKey associated with the id.