Invalidate

class Invalidate<T>(key: QueryKey<T>, revision: String, marker: Marker = Marker.None, callback: QueryCallback<T>? = null) : QueryCommand<T>

Invalidates the data and performs data fetching and validation based on the current data state.

This command is invoked via QueryRef when the data is invalidated.

Parameters

key

Instance of a class implementing QueryKey.

revision

The revision of the data to be invalidated.

marker

The marker with additional information based on the caller of a query.

callback

The callback to receive the result of the query.

Constructors

Link copied to clipboard
constructor(key: QueryKey<T>, revision: String, marker: Marker = Marker.None, callback: QueryCallback<T>? = null)

Functions

Link copied to clipboard
open suspend override fun handle(ctx: QueryCommand.Context<T>)

Handles the query.