From 90a46a44fbe11d7210845209149c7e7c2438c52d Mon Sep 17 00:00:00 2001 From: bombies Date: Sat, 16 Sep 2023 12:30:52 -0500 Subject: [PATCH] Add a nil check for getting items from redis --- .../main/utils/database/mongodb/cache/redis/RedisCache.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/main/utils/database/mongodb/cache/redis/RedisCache.kt b/src/main/kotlin/main/utils/database/mongodb/cache/redis/RedisCache.kt index 3b814e40..b3e64a82 100644 --- a/src/main/kotlin/main/utils/database/mongodb/cache/redis/RedisCache.kt +++ b/src/main/kotlin/main/utils/database/mongodb/cache/redis/RedisCache.kt @@ -67,7 +67,7 @@ abstract class RedisCache protected constructor(cacheID: String) { protected open suspend fun get(identifier: String): String? = coroutineScope { val item = jedis.get(cacheID + identifier) - return@coroutineScope item.ifBlank { null } + return@coroutineScope if (item == "nil") null else item } protected open suspend fun get(identifier: Long): String? {