store

open fun <X> store(id: String, value: X)

Store something in the cache. This function will cache for 3600 seconds (one hour).

Parameters

id

The id of the cache item. Should be something unique.

value

The value to store in the cache.

<X>

The type of the value which should be cached.


open fun <X> store(id: String, value: X, validUntil: Int)

Store something in the cache.

Parameters

id

The id of the cache item. Should be something unique.

value

The value to store in the cache.

validUntil

How long the cache should be valid. In seconds.

<X>

The type of the value which should be cached.