You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the function to check if a key exist or not, but actually I have a list of keys that needs to be checked. I can't find a func that would accept a list of keys and do this as a bulk check. Is there a reason why this was not implemented? if not, would that be possible to implement it?
We have achieved this by the following implementation:
redisOperations.execute { connection ->
val keyCommands = connection.keyCommands()
val existsMonos = keys.map { key ->
keyCommands.exists(ByteBuffer.wrap(key))
.map { it == true }
.onErrorReturn(false)
}
Mono.zip(existsMonos) { it }
}.awaitFirst()
redisOperations is a ReactiveRedisOperations type.
The versions:
org.springframework.data:spring-data-redis:3.2.2 java 21.0.2-librca Kotlin compiler version 1.9.22
Thank you
The text was updated successfully, but these errors were encountered:
kutlueren
changed the title
EXISTS to check multiple keys existanceEXISTS to check multiple keys existence
Mar 28, 2024
kutlueren
changed the title
EXISTS to check multiple keys existenceEXISTS to check multiple key existence
Mar 28, 2024
I am using the function to check if a key exist or not, but actually I have a list of keys that needs to be checked. I can't find a func that would accept a list of keys and do this as a bulk check. Is there a reason why this was not implemented? if not, would that be possible to implement it?
We have achieved this by the following implementation:
redisOperations
is aReactiveRedisOperations
type.The versions:
org.springframework.data:spring-data-redis:3.2.2
java 21.0.2-librca
Kotlin compiler version 1.9.22
Thank you
The text was updated successfully, but these errors were encountered: