Bug in generating keys for Redis.
Hi I'm working on implmentation of FactFinder in spryker system.
I found out that sku that gets returned from FactFinder is used to generate redis key. With that redis key we are querying redis to get the data.
Method in ProductAbstractStorageReader class(vendor/spryker/product-storage/src/Spryker/Client/ProductStorage/Storage/ProductAbstractStorageReader.php) called "findProductAbstractStorageDataByMapping".
That method is called in my case fro 10 places:
As picture suggest those are all bridges from some glue API. Method has first parameter "MAPPING TYPE".
If I go to see what value does $mappingType have it is always "sku"
The method "findProductAbstractStorageDataByMapping" generates $reference
$reference = $mappingType . ':' . $identifier;
Identifier is SKU of product. Let's take some sku. For example i have sku "M100000068" for one abstract product.
$reference = "sku" . ":" . "M100000068";
So result is "sku:M100000068"
Key generation in redis has some rules and are defined in xml file.
Key is build like:
resource, store, locale, key_suffix_column
Since glue apis and FactFinder are concatenating reference as "sku" . ":" . "[sku_number]" that reference would never match any of the keys in redis since keys in redis have different logic of generation.
When i call FactFinder or any GLUE apis that were mentioned in bridges in picture above.
They will generate key like:
And all keys in redis will look like.
All of that being said. I can not see a way for this to work. Is this a known bug? Or am I missing something?
- All Categories
- 38 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 33 Spryker News
- 565 Developer Corner
- 435 Spryker Development
- 54 Spryker Dev Environment
- 296 Spryker Releases
- 30 Propel ORM
- 47 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
- 46 Spryker Safari Questions
- 36 The Blackhole