Hi there,
we are implementing a cache in redis. Sometimes, all the keys matching a certain pattern are needed.
The API provides 2 ways to get them:
The challenge with rescan is, that one has to loop, whereas the result of rekeys might become very large. Our solution is to use
rxScan(..).toBlocking().value()
in a loop which is embedded in an executeBlocking-clause, but that's not very elegant.
Is there a better solution we do not see or is is there a need for a new API function in redis?
Looking at the SQLConnection-API, the problem of large result sets was solved by a streaming API.
IMHO it would be very helpful, to have an API like
Stream<String>rxKeysStream(pattern)
for redis.
Best regards
--Ulrich