AsyncInmemoryCache

class AsyncInmemoryCache(val timeProvider: TimeProvider = TimeProvider)

Constructors

Link copied to clipboard
constructor(timeProvider: TimeProvider = TimeProvider)

Types

Link copied to clipboard
data class Entry(val timestamp: DateTime, val data: Deferred<Any?>)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

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>