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

Apply range on the values of redis cache [duplicate]

$
0
0

I am using Elastic cache and redis in my project. I have the cache where key is String and Employee object as value. Employee class is as below. Is there any way to query redis such that it returns employee whose startrange and endrange fulfill the criteria : startrange<input<endrange. Where input will be passed to the query.

Employee

int startRange;int endRange;

Redis Entries

1   Employee{startRange=12300 ,endRange=12399 }2   Employee{startRange=45600 ,endRange=45699 }3   Employee{startRange=78900 ,endRange=78999 }

Input: 12345

Output

1   Employee{startRange=12300 ,endRange=12399 }

Viewing all articles
Browse latest Browse all 2204

Trending Articles



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