toggle menu
Airship Android SDK
androidJvm
switch theme
search in API
urbanairship-core
/
com.urbanairship.util
/
CachedValue
Cached
Value
@
RestrictTo
(
value
=
RestrictTo.Scope.LIBRARY_GROUP
)
open
class
CachedValue
<
T
>
Caches a value in memory with an expiration.
Parameters
<T>
Members
Constructors
Cached
Value
Link copied to clipboard
constructor
(
)
constructor
(
@
NonNull
clock
:
Clock
)
Functions
expire
Link copied to clipboard
open
fun
expire
(
)
expire
If
Link copied to clipboard
open
fun
expireIf
(
predicate
:
Predicate
<
T
>
)
get
Link copied to clipboard
@
Nullable
open
fun
get
(
)
:
T
remaining
Cache
Time
Millis
Link copied to clipboard
open
fun
remainingCacheTimeMillis
(
)
:
Long
set
Link copied to clipboard
open
fun
set
(
@
Nullable
value
:
T
,
expiryDateMs
:
Long
)