queryFactoryOf
fun <TInput : CacheableInput.QueryInput, TData, TError : Throwable> queryFactoryOf(cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, query: suspend (input: TInput) -> TData): QueryFactoryWithInput<TInput, TData, TError>
Creates a QueryFactoryWithInput.
Parameters
dispatcher
The dispatcher operations run on. Defaults to Dispatchers.Default. Generally should not need to be changed — use withContext(Dispatchers.IO) inside your query lambda for IO-bound work instead.
fun <TInput : CacheableInput.QueryInput, TData, TError : Throwable> queryFactoryOf(cache: OnHandCache, cacheKey: TInput, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, query: suspend () -> TData): QueryFactoryWithNoInput<TData, TError>
Creates a QueryFactoryWithNoInput.
Parameters
dispatcher
The dispatcher operations run on. Defaults to Dispatchers.Default. Generally should not need to be changed — use withContext(Dispatchers.IO) inside your query lambda for IO-bound work instead.