getString

open fun getString(@NonNull() key: String): String

Return the string value in cache.

Return

the string value if cache exists or null otherwise

Parameters

key

The key of cache.

open fun getString(@NonNull() key: String, defaultValue: String): String

Return the string value in cache.

Return

the string value if cache exists or defaultValue otherwise

Parameters

key

The key of cache.

defaultValue

The default value if the cache doesn't exist.