SwrCachePlus

An enhanced version of SwrCache that integrates SwrClientPlus into SwrCache.

Constructors

Link copied to clipboard
constructor(coroutineScope: CoroutineScope)
constructor(policy: SwrCachePlusPolicy)

Properties

Link copied to clipboard

The default mutation options.

Link copied to clipboard

The default query options.

Link copied to clipboard

The default subscription options.

Link copied to clipboard
open override val errorRelay: Flow<ErrorRecord>

Provides a unified feedback mechanism for all Query/Mutation errors that occur within the client.

Functions

Link copied to clipboard
open override fun gc(level: MemoryPressureLevel)

Releases data in memory based on the specified level.

Link copied to clipboard
open override fun <T, S> getInfiniteQuery(key: InfiniteQueryKey<T, S>, marker: Marker): InfiniteQueryRef<T, S>

Gets the InfiniteQueryRef by the specified InfiniteQueryKey.

Link copied to clipboard
open override fun <T, S> getInfiniteQueryData(id: InfiniteQueryId<T, S>): QueryChunks<T, S>?

Retrieves data of the InfiniteQueryKey associated with the id.

Link copied to clipboard
open override fun <T, S> getMutation(key: MutationKey<T, S>, marker: Marker): MutationRef<T, S>

Gets the MutationRef by the specified MutationKey.

Link copied to clipboard
open override fun <T> getQuery(key: QueryKey<T>, marker: Marker): QueryRef<T>

Gets the QueryRef by the specified QueryKey.

Link copied to clipboard
open override fun <T> getQueryData(id: QueryId<T>): T?

Retrieves data of the QueryKey associated with the id.

Link copied to clipboard
open override fun <T> getSubscription(key: SubscriptionKey<T>, marker: Marker): SubscriptionRef<T>

Gets the SubscriptionRef by the specified SubscriptionKey.

Link copied to clipboard
open override fun invalidateQueries(filter: InvalidateQueriesFilter)

Invalidates the queries by the specified InvalidateQueriesFilter.

Link copied to clipboard
open override fun <U : UniqueId> invalidateQueriesBy(vararg ids: U)

Invalidates the queries by the specified UniqueId.

Link copied to clipboard
open override fun onMount(id: String)

Executes initialization procedures based on events.

Link copied to clipboard
open override fun onUnmount(id: String)

Executes cleanup procedures based on events.

Link copied to clipboard
open override fun perform(sideEffects: QueryEffect): Job

Executes side effects for queries.

Link copied to clipboard
open override fun <T, S> prefetchInfiniteQuery(key: InfiniteQueryKey<T, S>, marker: Marker): Job

Prefetches the infinite query by the specified InfiniteQueryKey.

Link copied to clipboard
open override fun <T> prefetchQuery(key: QueryKey<T>, marker: Marker): Job

Prefetches the query by the specified QueryKey.

Link copied to clipboard
open override fun removeQueries(filter: RemoveQueriesFilter)

Removes the queries by the specified RemoveQueriesFilter.

Link copied to clipboard
open override fun <U : UniqueId> removeQueriesBy(vararg ids: U)

Removes the queries by the specified UniqueId.

Link copied to clipboard
open override fun resumeQueries(filter: ResumeQueriesFilter)

Resumes the queries by the specified ResumeQueriesFilter.

Link copied to clipboard
open override fun <U : UniqueId> resumeQueriesBy(vararg ids: U)

Resumes the queries by the specified UniqueId.

Link copied to clipboard
open override fun <T, S> updateInfiniteQueryData(id: InfiniteQueryId<T, S>, edit: QueryChunks<T, S>.() -> QueryChunks<T, S>)

Updates the data of the InfiniteQueryKey associated with the id.

Link copied to clipboard
open override fun <T> updateQueryData(id: QueryId<T>, edit: T.() -> T)

Updates the data of the QueryKey associated with the id.