Reputation: 7237
Scenario:
I have a big list of products which have the following properties
These product availability/price (origin data) are cached and will be used by multiple clients.
Each client will have different markup rule for them and therefore different final prices.
I need to apply filtering on those products based on price, etc..
However, loading them from redis and re-applying rules to build filter with redis is expensive.
Is there a better way to do this?
Upvotes: 1
Views: 9958
Reputation: 3063
This is feasible to some degree by using sortedsets (Z* commands) lexical ordering & compound sorted-set member keys assuming that:
:na:
where criteria is not present )If all of the above apply, SCAN (or ZSCAN
to be more specific), is your friend
You can also find more information here
Upvotes: 2