toTtlAt

fun <V> V.toTtlAt(ttlAt: Long): PreparedValue<V>

Converts a value to a PreparedValue with a specific expiration timestamp.

Return

a PreparedValue with the specified TTL

val tempValue = "myValue".toTtlAt(System.currentTimeMillis() + 3600000) // expires in 1 hour
assert(!tempValue.isForever) // false

Parameters

ttlAt

the expiration timestamp in milliseconds since epoch

Type Parameters

V

the type of the value