0

We are using Lettuce java client to connect to AWS Elasticache (Valkey engine, Serverless, version 8.0) from Java springboot application (JDK 17 & springboot version 3.2.5)

We have User information stored in cache with userId as cache key & the whole user object (in JSON format) as cache value. Example key value given below.

key = user:100 
value =
{
 "userId": 100,
 "firstName": "James",
 "lastName": "Paul",
 "mobile": 5349997236
}

We can read from cache using jsonGet() by providing cache key. But I want to read from cache using other fields like, I want to retrieve all the users who have firstName = "James" WITHOUT providing cache key.

Is this possible to filter cache values using internal json fields instead of cache key?

asked Apr 10 at 6:20

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.