Synchronizing data to Redis without intermediate database table
"To synchronize data with Redis, an intermediate Zed database table is required."
But… is it? I'm sure there is a way to directly queue stuff in a sync.storage.* queue, but haven't quite figured it out yet.
The use case I have is that I need to store just a mapping between a product attribute value and another thing in Redis, and it doesn't make sense to me to create a *_storage table just for this.
Originally I just used the default product_concrete storage but inactive products are not stored in Redis, and I need those.
Answers
-
You could adapt the publishing writer of your entity to immediately put the data into the related sync queue.
The sync behavior of propel ( ) would be a good place to look on how to sync into the storage queue.
But there is a reason for the intermediate store/page_search tables. If you ever have a data loss in the storage or search you want to restore the data as fast as possible.
If you need to recalculate the data (publishing) it will normally take significantly longer then just synchronizing into the storage or search (synchronization)1
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 896 Developer Corner
- 758 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 23 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random