Skip to content

Commit

Permalink
Add a blank check for getting items from redis
Browse files Browse the repository at this point in the history
  • Loading branch information
bombies committed Sep 16, 2023
1 parent 851c804 commit c7bcfa1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ abstract class RedisCache protected constructor(cacheID: String) {
}

protected open suspend fun get(identifier: String): String? = coroutineScope {
return@coroutineScope jedis.get(cacheID + identifier)
val item = jedis.get(cacheID + identifier)
return@coroutineScope item.ifBlank { null }
}

protected open suspend fun get(identifier: Long): String? {
Expand Down

0 comments on commit c7bcfa1

Please sign in to comment.