toggle menu
korge-root
5.1.0
common
switch theme
search in API
korge-core
/
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
:
TimeSpan
,
gen
:
suspend
(
)
->
T
)
:
T
fun
<
T
:
Any
>
get
(
clazz
:
KClass
<
T
>
,
key
:
String
,
ttl
:
TimeSpan
)
:
AsyncInmemoryEntry
<
T
>