yolk
/
ru.dimsuz.yolk
/
Cache
common
Cache
class
Cache
<
K
:
Any
,
V
>(expirePolicy:
ExpirePolicy
<
K
>, fetch: suspend (
K
) ->
V
, keyStore:
KeyStore
<
K
>, valueStore:
ValueStore
<
K
,
V
>, ticker:
Ticker
)
Content copied to clipboard
Functions
Properties
Functions
has
Expired
Link copied to clipboard
common
suspend fun
hasExpired
(key:
K
):
Boolean
Content copied to clipboard
invalidate
Link copied to clipboard
common
suspend fun
invalidate
(key:
K
)
Content copied to clipboard
load
Link copied to clipboard
common
suspend fun
load
(key:
K
, forceRefresh:
Boolean
= false):
V
Content copied to clipboard
Properties
events
Link copied to clipboard
common
val
events
:
<ERROR CLASS>
<
CacheEvent
<
K
>>
Content copied to clipboard
Emits cache events. If backpressure occurs, older unprocessed items will be dropped.