Are there any ways to check whether a key exists with RedisTemplate?
10,985
Yes, you can use public Boolean hasKey(K key)
.
You can just search exists in redisTemplate javadoc
Author by
Lily
Updated on June 05, 2022Comments
-
Lily almost 2 years
Are there any ways to check whether a key exists with RedisTemplate? or in other words, are there any equivalent of Redis
exists
command in RedisTemplate API?