-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache IsProductAssignedToStock service to improve cart performance #2692
Conversation
…ase calls for same item
@sky-hub unfortunately, only members of the maintainers team are allowed to assign developers to the pull request |
Hi @sky-hub Thank you for the PR! I've got a couple of questions regarding this.
|
…ct-stock-assignation-cache
Note: If you would like to have a cache service injected in current interceptor instead of caching in interceptor, please let me know and i will update accordingly. |
@sky-hub Current approach seems ok to me. Thanks for the numbers, appreciate your efforts. I'll merge it once again with |
…ct-stock-assignation-cache
Description (*)
While in cart or checkout page a large number of database queries are performed to check if a product is assigned to a specific stockId. Queries are correlated with the number of products in cart, more products, more queries for same product. The issue is manifested while Magento_Inventory module is enabled.
Tested on Magento Open Source 2.3.1
Query is: select stock_source_link.* from inventory_source_stock_link as stock_source_link join inventory_source_item on inventory_source_item.source_code = stock_source_link.source_code where (stock_source_link.stock_id = ?) and (inventory_source_item.sku = ?)
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
N/A
Contribution checklist (*)