Skip to content
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

do not clear cache when there is no product id #44

Closed
tmotyl opened this issue Oct 5, 2015 · 2 comments
Closed

do not clear cache when there is no product id #44

tmotyl opened this issue Oct 5, 2015 · 2 comments
Labels
Component: Catalog Relates to Mage_Catalog performance Performance related

Comments

@tmotyl
Copy link
Contributor

tmotyl commented Oct 5, 2015

Magento calls cleanCache on before_save in product even if there is no product ID yet (product was just created).
This can lead to unnecessary cache clearing.

see
https://github.com/OpenMage/magento-lts/blob/1.9.2.1/app/code/core/Mage/Catalog/Model/Product.php#L618

the clean cache should be wrapped in
if ($this->getId()) {
}

@LeeSaferite
Copy link
Contributor

Could you submit a PR?

@tmotyl
Copy link
Contributor Author

tmotyl commented Oct 5, 2015

sure I will :)

tmotyl added a commit that referenced this issue Oct 8, 2015
Flyingmana pushed a commit to Flyingmana/magento-lts that referenced this issue Oct 18, 2016
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Nov 27, 2017
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Dec 6, 2017
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Feb 28, 2018
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Jul 17, 2018
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Sep 19, 2018
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Feb 14, 2019
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Apr 1, 2019
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Aug 22, 2019
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Oct 25, 2019
@sreichel sreichel added Component: Catalog Relates to Mage_Catalog fixed performance Performance related labels Jun 27, 2020
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Aug 20, 2020
randallelliott714 added a commit to randallelliott714/magento that referenced this issue Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Relates to Mage_Catalog performance Performance related
Projects
None yet
Development

No branches or pull requests

3 participants