Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Is it possible to check for betweenness in the key in redis cache

$
0
0

I have a requirement to check if the input number is between 2 ranges lowrange and highrange. These range values can be defined as 2 separate columns like below(similar to RDBMS) or maybe any other datastructure that redis or any in memory cache supports. I know redis or any other cache for that matter stores key value pair but is there any datastructure that redis has, that can support below use case? I thought of having a string key that can store "lowrange-highrange", but that means I have to iteratively read all the keys of cache, store them locally and then check if my int input is between them.

Input = 12345

Entry in redis

lowrange    highrange   value

12340      12349    "I am inside this range"


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>