From 0ca70e9c6d91c2537a10c8677b8e46f9ae254830 Mon Sep 17 00:00:00 2001 From: Tymoteusz Motylewski Date: Thu, 8 Oct 2015 09:28:03 +0200 Subject: [PATCH] [impr-#45] Do not clear product cache when saving a new product Resolves https://github.com/OpenMage/magento-lts/issues/44 --- app/code/core/Mage/Catalog/Model/Product.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php index 7a0cf6a7f31..2aa44f67c87 100644 --- a/app/code/core/Mage/Catalog/Model/Product.php +++ b/app/code/core/Mage/Catalog/Model/Product.php @@ -623,7 +623,9 @@ protected function _getResource() */ public function cleanCache() { - Mage::app()->cleanCache('catalog_product_'.$this->getId()); + if ($this->getId()) { + Mage::app()->cleanCache('catalog_product_'.$this->getId()); + } return $this; }