CacheableQueryWithNoInput

class CacheableQueryWithNoInput<TData, TError : Throwable>(coroutineScope: CoroutineScope, launchQuery: suspend () -> TData?, val cacheKey: CacheableInput.QueryInput, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, initialFetchState: FetchState = FetchState.IDLE)

Constructors

Link copied to clipboard
constructor(coroutineScope: CoroutineScope, launchQuery: suspend () -> TData?, cacheKey: CacheableInput.QueryInput, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, initialFetchState: FetchState = FetchState.IDLE)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
operator fun component1(): StateFlow<CacheableQueryResult<TData, TError>>
Link copied to clipboard
suspend fun fetch(onSuccess: suspend (TData) -> Unit? = null, onError: suspend (TError) -> Unit? = null)