# Package-level declarations

## Types

CacheRepo
Link copied to clipboard
typealias CacheRepo = InvalidatableRepo
CommonCacheRepo
Link copied to clipboard
interface CommonCacheRepo : InvalidatableRepo

Any inheritor of this should work with next logic: try to take data from some dev.inmo.micro_utils.repos.cache.cache.KVCache and, if not exists, take from origin and save to the cache for future reuse

CRUDCacheRepo
Link copied to clipboard
open class CRUDCacheRepo < ObjectType , IdType , InputValueType >(crudRepo: CRUDRepo < ObjectType , IdType , InputValueType >, kvCache: KVCache < IdType , ObjectType >, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), locker: SmartRWLocker = SmartRWLocker(), idGetter: ( ObjectType ) -> IdType ) : ReadCRUDCacheRepo < ObjectType , IdType > , WriteCRUDRepo < ObjectType , IdType , InputValueType > , CRUDRepo < ObjectType , IdType , InputValueType >
FallbackCacheRepo
Link copied to clipboard
interface FallbackCacheRepo : InvalidatableRepo

Any inheritor of this should work with next logic: try to take data from their original repo, if successful - save data to internal dev.inmo.micro_utils.repos.cache.cache.FullKVCache or try to take data from that internal cache

InvalidatableRepo
Link copied to clipboard
interface InvalidatableRepo
KeyValueCacheRepo
Link copied to clipboard
open class KeyValueCacheRepo < Key , Value >(kvRepo: KeyValueRepo < Key , Value >, kvCache: KVCache < Key , Value >, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), locker: SmartRWLocker = SmartRWLocker()) : ReadKeyValueCacheRepo < Key , Value > , KeyValueRepo < Key , Value > , WriteKeyValueRepo < Key , Value > , CommonCacheRepo
KeyValuesCacheRepo
Link copied to clipboard
open class KeyValuesCacheRepo < Key , Value >(parentRepo: KeyValuesRepo < Key , Value >, kvCache: KVCache < Key , List < Value >>, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), locker: SmartRWLocker = SmartRWLocker()) : ReadKeyValuesCacheRepo < Key , Value > , KeyValuesRepo < Key , Value > , WriteKeyValuesRepo < Key , Value > , CommonCacheRepo
ReadCRUDCacheRepo
Link copied to clipboard
open class ReadCRUDCacheRepo < ObjectType , IdType >(parentRepo: ReadCRUDRepo < ObjectType , IdType >, kvCache: KVCache < IdType , ObjectType >, locker: SmartRWLocker = SmartRWLocker(), idGetter: ( ObjectType ) -> IdType ) : ReadCRUDRepo < ObjectType , IdType > , CommonCacheRepo
ReadKeyValueCacheRepo
Link copied to clipboard
open class ReadKeyValueCacheRepo < Key , Value >(parentRepo: ReadKeyValueRepo < Key , Value >, kvCache: KVCache < Key , Value >, locker: SmartRWLocker = SmartRWLocker()) : ReadKeyValueRepo < Key , Value > , CommonCacheRepo
ReadKeyValuesCacheRepo
Link copied to clipboard
open class ReadKeyValuesCacheRepo < Key , Value >(parentRepo: ReadKeyValuesRepo < Key , Value >, kvCache: KVCache < Key , List < Value >>, locker: SmartRWLocker = SmartRWLocker()) : ReadKeyValuesRepo < Key , Value > , CommonCacheRepo
WriteCRUDCacheRepo
Link copied to clipboard
open class WriteCRUDCacheRepo < ObjectType , IdType , InputValueType >(parentRepo: WriteCRUDRepo < ObjectType , IdType , InputValueType >, kvCache: KeyValueRepo < IdType , ObjectType >, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), locker: SmartRWLocker = SmartRWLocker(), idGetter: ( ObjectType ) -> IdType ) : WriteCRUDRepo < ObjectType , IdType , InputValueType > , CommonCacheRepo

## Functions

alsoInvalidate
Link copied to clipboard
suspend fun < T : InvalidatableRepo > T . alsoInvalidate (): T
alsoInvalidateAsync
Link copied to clipboard
fun < T : InvalidatableRepo > T . alsoInvalidateAsync (scope: CoroutineScope): T
alsoInvalidateSync
Link copied to clipboard
fun < T : InvalidatableRepo > T . alsoInvalidateSync (onFailure: suspend ( Throwable ) -> Unit = {}): T
fun < T : InvalidatableRepo > T . alsoInvalidateSync (scope: CoroutineScope, onFailure: suspend ( Throwable ) -> Unit = {}): T
alsoInvalidateSyncLogging
Link copied to clipboard
fun < T : InvalidatableRepo > T . alsoInvalidateSyncLogging (errorMessageBuilder: CoroutineScope.( Throwable ) -> Any = { "Something web wrong" }, logger: KSLog = KSLog): T
fun < T : InvalidatableRepo > T . alsoInvalidateSyncLogging (scope: CoroutineScope, errorMessageBuilder: CoroutineScope.( Throwable ) -> Any = { "Something web wrong" }, logger: KSLog = KSLog): T
cached
Link copied to clipboard
fun < Key , Value > ReadKeyValueRepo < Key , Value >. cached (kvCache: KVCache < Key , Value >, locker: SmartRWLocker = SmartRWLocker()): ReadKeyValueCacheRepo < Key , Value >
fun < Key , Value > ReadKeyValuesRepo < Key , Value >. cached (kvCache: KVCache < Key , List < Value >>, locker: SmartRWLocker = SmartRWLocker()): ReadKeyValuesCacheRepo < Key , Value >
fun < Key , Value > KeyValueRepo < Key , Value >. cached (kvCache: KVCache < Key , Value >, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), locker: SmartRWLocker = SmartRWLocker()): KeyValueCacheRepo < Key , Value >
fun < Key , Value > KeyValuesRepo < Key , Value >. cached (kvCache: KVCache < Key , List < Value >>, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), locker: SmartRWLocker = SmartRWLocker()): KeyValuesCacheRepo < Key , Value >
fun < ObjectType , IdType > ReadCRUDRepo < ObjectType , IdType >. cached (kvCache: KVCache < IdType , ObjectType >, locker: SmartRWLocker = SmartRWLocker(), idGetter: ( ObjectType ) -> IdType ): ReadCRUDCacheRepo < ObjectType , IdType >
fun < ObjectType , IdType , InputType > CRUDRepo < ObjectType , IdType , InputType >. cached (kvCache: KVCache < IdType , ObjectType >, scope: CoroutineScope, locker: SmartRWLocker = SmartRWLocker(), idGetter: ( ObjectType ) -> IdType ): CRUDCacheRepo < ObjectType , IdType , InputType >
caching
Link copied to clipboard
fun < ObjectType , IdType , InputType > WriteCRUDRepo < ObjectType , IdType , InputType >. caching (kvCache: KVCache < IdType , ObjectType >, scope: CoroutineScope, locker: SmartRWLocker = SmartRWLocker(), idGetter: ( ObjectType ) -> IdType ): WriteCRUDCacheRepo < ObjectType , IdType , InputType >