cache4k icon indicating copy to clipboard operation
cache4k copied to clipboard

value is always returning null

Open utills opened this issue 2 years ago • 1 comments

code fun storeCredentials(value: String) { val cache = Cache.Builder<String, String>().build() cache.put(KeyConstant.userCredentials, value) val value = cache.get(KeyConstant.userCredentials) print(value) }

fun retrieveCredentials(): String? {
    val cache = Cache.Builder<String, String>().build()
    val creds = cache.get(KeyConstant.userCredentials)
    return creds
}

utills avatar Dec 24 '23 15:12 utills