'Does jedis have a method that can take a partial key and returns all the values that match that partial key

I have a requirement, where I have built up a key with two elements clientid-systemid, using get, will return the value for that one key.

I also have a requirement where using a partial key clientid. I will return all values for that clientId.

Currently, I have it broken down into two calls to the cache. Call 1 uses jedis.scan, this will return a list of all the keys of type clientid-systemid, prefixed with that clients Id. I then call jedis.mget, and this returns all the values for that list of keys.

What I am trying to do is have it as one method call. I thought it was hscan or sscan. But it looks as if they are not the correct calls.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source