korlibs
Toggle table of contents
6.1.0-SNAPSHOT
common
Target filter
common
Switch theme
Search in API
Skip to content
korlibs
korlibs-io
/
korlibs.io.async
/
AsyncInmemoryCache
Async
Inmemory
Cache
class
AsyncInmemoryCache
(
val
timeProvider
:
TimeProvider
=
TimeProvider
)
Members
Constructors
Async
Inmemory
Cache
Link copied to clipboard
constructor
(
timeProvider
:
TimeProvider
=
TimeProvider
)
Types
Entry
Link copied to clipboard
data
class
Entry
(
val
timestamp
:
DateTime
,
val
data
:
Deferred
<
Any
?
>
)
Properties
cache
Link copied to clipboard
val
cache
:
LinkedHashMap
<
String
,
AsyncInmemoryCache.Entry
?
>
time
Provider
Link copied to clipboard
val
timeProvider
:
TimeProvider
Functions
get
Link copied to clipboard
suspend
fun
<
T
>
get
(
key
:
String
,
ttl
:
Duration
,
gen
:
suspend
(
)
->
T
)
:
T
fun
<
T
:
Any
>
get
(
clazz
:
KClass
<
T
>
,
key
:
String
,
ttl
:
Duration
)
:
AsyncInmemoryEntry
<
T
>