bug: scan
on listDocs
is only performed against a single node, in clustered
Redis
#22
Labels
bug
Something isn't working
We use
scan
inlistDocs
. This works as is with a Non-clustered Redis, but with Clustered Redis,scan
must be performed against each node in the cluster, thus requiring a map-reduce pattern to gather all matches, across nodes in the cluster.See https://www.dontpanicblog.co.uk/2022/07/30/scan-a-redis-cluster/ for potential approaches.
Another approach is to use what is described in #17 to force all keys in a store to the same slot ie. the same node. Since all keys are prefixed with the hyper cache store name, we can hashtag the store name, forcing all keys in a store to the same hash slot.
Ergo, If we hashtag the store name, a
scan
on a single node will work in both clustered and non-clustered Redis.The text was updated successfully, but these errors were encountered: