-
Notifications
You must be signed in to change notification settings - Fork 9.4k
39056: Product stock status change does not purge product varnish cache #39118
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
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @zakdma. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@@ -54,6 +54,7 @@ public function __construct( | |||
public function execute($ids) | |||
{ | |||
$this->_productStockIndexerRows->execute($ids); | |||
$this->getCacheContext()->registerEntities(ProductModel::CACHE_TAG, $ids); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation is cleanup all caches in case on changes to a inventory, not only in. case of inventory status.
As result product page/category page cache will be cleanup after any checkout and significanly reduce cache hit/miss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the main idea. We need to update product page in case ANY inventory change for product, not only status but also quantity.
ERP updates inventory using API and we need product pages updated accordingly.
Maybe its not suitable for Magento platform itself, in this case just close this.
@magento run all tests |
Description (*)
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)