Get all values of a type from Redis

Hi,
I need to read all merchants from the Redis in performant way.
I tried to use \Spryker\Client\Storage\StorageClientInterface::getKeys
with kv:merchant:*
wildcard , but it is blocking Redis, so whole system slows down.
I tried \Spryker\Client\Storage\StorageClientInterface::scanKeys
as well, but it's too slow in big redis set.
Does the Spryker have any solution for that? Predis
lib supports hash
methods ( HSET
, HGET
, etc), but i don't see them in Spryker's wrapper of Predis
.
Do you know any better or other solution to read all values of key subset (all merchants) from redis?
Answers
-
Why do u need to read all merchants from Redis?
0 -
Merchants collection is just an example. We have such business case, which has to be fullfilled.
At some cases it may be better to use ES for example, but we have a case, where we have a few dozen values of one type in Redis and easiest would be to just read them all at once instead of introducing ES or custom solution for that.
0
Categories
- All Categories
- 38 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 32 Spryker News
- 534 Developer Corner
- 405 Spryker Development
- 54 Spryker Dev Environment
- 272 Spryker Releases
- 30 Propel ORM
- 46 Community Projects
- 6 Gacela Project
- 3 PHP Bridge
- 21 Hackathon
- 3.2K 📜 Slack Archives
- 115 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random
- 4 Code Testing
- 23 Product & Business Questions
- 40 Spryker Safari Questions
- 35 The Blackhole