diff --git a/classes/Address.php b/classes/Address.php index adb7e7d7f..f74697445 100644 --- a/classes/Address.php +++ b/classes/Address.php @@ -264,7 +264,7 @@ class AddressCore extends ObjectModel if(!isset($id_address) || empty($id_address)) return false; - $cache_id = __CLASS__.__FUNCTION__.(int)$id_address; + $cache_id = 'Address::isCountryActiveById_'.(int)$id_address; if (!Cache::isStored($cache_id)) { $result = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getvalue(' @@ -328,7 +328,7 @@ class AddressCore extends ObjectModel { if (!$id_customer) return false; - $cache_id = __CLASS__.__FUNCTION__.(int)$id_customer.'-'.(bool)$active; + $cache_id = 'Address::getFirstCustomerAddressId_'.(int)$id_customer.'-'.(bool)$active; if (!Cache::isStored($cache_id)) { $result = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' diff --git a/classes/Carrier.php b/classes/Carrier.php index a38ad0692..726bac6c0 100644 --- a/classes/Carrier.php +++ b/classes/Carrier.php @@ -277,7 +277,7 @@ class CarrierCore extends ObjectModel public function getMaxDeliveryPriceByWeight($id_zone) { - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id.'-'.(int)$id_zone; + $cache_id = 'Carrier::getMaxDeliveryPriceByWeight_'.(int)$this->id.'-'.(int)$id_zone; if (!Cache::isStored($cache_id)) { $sql = 'SELECT d.`price` @@ -360,7 +360,7 @@ class CarrierCore extends ObjectModel public function getMaxDeliveryPriceByPrice($id_zone) { - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id.'-'.(int)$id_zone; + $cache_id = 'Carrier::getMaxDeliveryPriceByPrice_'.(int)$this->id.'-'.(int)$id_zone; if (!Cache::isStored($cache_id)) { $sql = 'SELECT d.`price` @@ -455,7 +455,7 @@ class CarrierCore extends ObjectModel GROUP BY c.`id_carrier` ORDER BY c.`position` ASC'; - $cache_id = __CLASS__.__FUNCTION__.md5($sql); + $cache_id = 'Carrier::getCarriers_'.md5($sql); if (!Cache::isStored($cache_id)) { $carriers = Db::getInstance()->executeS($sql); @@ -1211,7 +1211,7 @@ class CarrierCore extends ObjectModel $query->where('pc.id_product = '.(int)$product->id); $query->where('pc.id_shop = '.(int)$id_shop); - $cache_id = __CLASS__.__FUNCTION__.(int)$product->id.'-'.(int)$id_shop; + $cache_id = 'Carrier::getAvailableCarrierList_'.(int)$product->id.'-'.(int)$id_shop; if (!Cache::isStored($cache_id)) { $carriers_for_product = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); diff --git a/classes/Cart.php b/classes/Cart.php index fc313e8aa..0bceb12ab 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -325,7 +325,7 @@ class CartCore extends ObjectModel if (!CartRule::isFeatureActive() || !$this->id) return array(); - $cache_key = __CLASS__.__FUNCTION__.$this->id.'-'.$filter; + $cache_key = 'Cart::getCartRules_'.$this->id.'-'.$filter; if (!Cache::isStored($cache_key)) { $result = Db::getInstance()->executeS(' @@ -368,7 +368,7 @@ class CartCore extends ObjectModel { if (!CartRule::isFeatureActive()) return 0; - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id.'-'.(int)$id_cart_rule; + $cache_id = 'Cart::getDiscountsCustomer_'.(int)$this->id.'-'.(int)$id_cart_rule; if (!Cache::isStored($cache_id)) { $result = (int)Db::getInstance()->getValue(' @@ -636,7 +636,7 @@ class CartCore extends ObjectModel if (!isset($row['pai_id_image']) || $row['pai_id_image'] == 0) { - $cache_id = __CLASS__.__FUNCTION__.'-pai_id_image-'.(int)$row['id_product'].'-'.(int)$this->id_lang.'-'.(int)$row['id_shop']; + $cache_id = 'Cart::getProducts_'.'-pai_id_image-'.(int)$row['id_product'].'-'.(int)$this->id_lang.'-'.(int)$row['id_shop']; if (!Cache::isStored($cache_id)) { $row2 = Db::getInstance()->getRow(' @@ -1104,7 +1104,7 @@ class CartCore extends ObjectModel */ public function orderExists() { - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id; + $cache_id = 'Cart::orderExists_'.(int)$this->id; if (!Cache::isStored($cache_id)) { $result = (bool)Db::getInstance()->getValue('SELECT count(*) FROM `'._DB_PREFIX_.'orders` WHERE `id_cart` = '.(int)$this->id); diff --git a/classes/Category.php b/classes/Category.php index a7da52113..568e914a0 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -704,7 +704,7 @@ class CategoryCore extends ObjectModel if (!Validate::isBool($active)) die(Tools::displayError()); - $cache_id = __CLASS__.__FUNCTION__.(int)$id_parent.'-'.(int)$id_lang.'-'.(bool)$active.'-'.(int)$id_shop; + $cache_id = 'Category::getChildren_'.(int)$id_parent.'-'.(int)$id_lang.'-'.(bool)$active.'-'.(int)$id_shop; if (!Cache::isStored($cache_id)) { $query = 'SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, category_shop.`id_shop` @@ -1014,7 +1014,7 @@ class CategoryCore extends ObjectModel public function getGroups() { $groups = array(); - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id; + $cache_id = 'Category::getGroups_'.(int)$this->id; if (!Cache::isStored($cache_id)) { $result = Db::getInstance()->executeS(' @@ -1048,7 +1048,7 @@ class CategoryCore extends ObjectModel */ public function checkAccess($id_customer) { - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id.'-'.$id_customer.(!$id_customer ? '-'.(int)Group::getCurrent()->id : ''); + $cache_id = 'Category::checkAccess_'.(int)$this->id.'-'.$id_customer.(!$id_customer ? '-'.(int)Group::getCurrent()->id : ''); if (!Cache::isStored($cache_id)) { if (!$id_customer) @@ -1210,7 +1210,7 @@ class CategoryCore extends ObjectModel */ public static function getInterval($id) { - $cache_id = __CLASS__.__FUNCTION__.(int)$id; + $cache_id = 'Category::getInterval_'.(int)$id; if (!Cache::isStored($cache_id)) { $sql = 'SELECT nleft, nright, level_depth @@ -1401,7 +1401,7 @@ class CategoryCore extends ObjectModel public static function getCategoriesWithoutParent() { - $cache_id = __CLASS__.__FUNCTION__.(int)Context::getContext()->language->id; + $cache_id = 'Category::getCategoriesWithoutParent_'.(int)Context::getContext()->language->id; if (!Cache::isStored($cache_id)) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' @@ -1431,7 +1431,7 @@ class CategoryCore extends ObjectModel { if (is_null($id_lang)) $id_lang = (int)Context::getContext()->language->id; - $cache_id = __CLASS__.__FUNCTION__.(int)$id_lang; + $cache_id = 'Category::getTopCategory_'.(int)$id_lang; if (!Cache::isStored($cache_id)) { $id_category = (int)Db::getInstance()->getValue(' diff --git a/classes/Customer.php b/classes/Customer.php index 4c3c78ed3..8191d3ee6 100644 --- a/classes/Customer.php +++ b/classes/Customer.php @@ -362,7 +362,7 @@ class CustomerCore extends ObjectModel { if (!Validate::isUnsignedId($id_customer)) return true; - $cache_id = __CLASS__.__FUNCTION__.(int)$id_customer; + $cache_id = 'Customer::isBanned_'.(int)$id_customer; if (!Cache::isStored($cache_id)) { $result = (bool)!Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' diff --git a/classes/Product.php b/classes/Product.php index a1fca7382..6bfdc8c53 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2440,7 +2440,7 @@ class ProductCore extends ObjectModel { if (!$context) $context = Context::getContext(); - $cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$context->shop->id; + $cache_id = 'Product::getOrderStates_'.(int)$id_product.'-'.(int)$context->shop->id; if (!Cache::isStored($cache_id)) { $sql = 'SELECT image_shop.`id_image` @@ -2513,7 +2513,7 @@ class ProductCore extends ObjectModel $cart_quantity = 0; if ((int)$id_cart) { - $cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$id_cart; + $cache_id = 'Product::getPriceStatic_'.(int)$id_product.'-'.(int)$id_cart; if (!Cache::isStored($cache_id)) { $sql = 'SELECT SUM(`quantity`) @@ -4313,7 +4313,7 @@ class ProductCore extends ObjectModel public function checkAccess($id_customer) { - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id.'-'.(int)$id_customer.(!$id_customer ? '-'.(int)Group::getCurrent()->id : ''); + $cache_id = 'Product::checkAccess_'.(int)$this->id.'-'.(int)$id_customer.(!$id_customer ? '-'.(int)Group::getCurrent()->id : ''); if (!Cache::isStored($cache_id)) { if (!$id_customer) @@ -4893,7 +4893,7 @@ class ProductCore extends ObjectModel { $id_lang = (int)Context::getContext()->language->id; $id_shop = (int)Context::getContext()->shop->id; - $cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$id_product_attribute.'-'.(int)$id_lang.'-'.(int)$id_shop; + $cache_id = 'Product::getAttributesParams_'.(int)$id_product.'-'.(int)$id_product_attribute.'-'.(int)$id_lang.'-'.(int)$id_shop; // if blocklayered module is installed we check if user has set custom attribute name if (Module::isInstalled('blocklayered') && Module::isEnabled('blocklayered')) diff --git a/classes/State.php b/classes/State.php index 3bdeba81b..205868a81 100644 --- a/classes/State.php +++ b/classes/State.php @@ -82,7 +82,7 @@ class StateCore extends ObjectModel { if (!$id_state) return false; - $cache_id = __CLASS__.__FUNCTION__.(int)$id_state; + $cache_id = 'State::getNameById_'.(int)$id_state; if (!Cache::isStored($cache_id)) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' @@ -105,7 +105,7 @@ class StateCore extends ObjectModel { if (empty($state)) return false; - $cache_id = __CLASS__.__FUNCTION__.pSQL($state); + $cache_id = 'State::getNameById_'.pSQL($state); if (!Cache::isStored($cache_id)) { $result = (int)Db::getInstance()->getValue(' diff --git a/classes/Tab.php b/classes/Tab.php index 9ed6cfb51..e6e14686b 100644 --- a/classes/Tab.php +++ b/classes/Tab.php @@ -190,7 +190,7 @@ class TabCore extends ObjectModel */ public static function getTab($id_lang, $id_tab) { - $cache_id = __CLASS__.__FUNCTION__.(int)$id_lang.'-'.(int)$id_tab; + $cache_id = 'Tab::getTab_'.(int)$id_lang.'-'.(int)$id_tab; if (!Cache::isStored($cache_id)) { /* Tabs selection */ diff --git a/classes/Zone.php b/classes/Zone.php index 7a476001a..1d39ad7b2 100644 --- a/classes/Zone.php +++ b/classes/Zone.php @@ -54,7 +54,7 @@ class ZoneCore extends ObjectModel */ public static function getZones($active = false) { - $cache_id = __CLASS__.__FUNCTION__.(bool)$active; + $cache_id = 'Zone::getZones_'.(bool)$active; if (!Cache::isStored($cache_id)) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' diff --git a/classes/module/Module.php b/classes/module/Module.php index b5dd2ef64..f6e3c6473 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -1864,7 +1864,7 @@ abstract class ModuleCore */ public static function getModuleIdByName($name) { - $cache_id = __CLASS__.__FUNCTION__.pSQL($name); + $cache_id = 'Module::getModuleIdByName_'.pSQL($name); if (!Cache::isStored($cache_id)) { $result = (int)Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = "'.pSQL($name).'"'); diff --git a/classes/order/Order.php b/classes/order/Order.php index 27d18181b..bf72b83fe 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -721,7 +721,7 @@ class OrderCore extends ObjectModel public static function getDiscountsCustomer($id_customer, $id_cart_rule) { - $cache_id = __CLASS__.__FUNCTION__.(int)$id_customer.'-'.(int)$id_cart_rule; + $cache_id = 'Order::getDiscountsCustomer_'.(int)$id_customer.'-'.(int)$id_cart_rule; if (!Cache::isStored($cache_id)) { $result = (int)Db::getInstance()->getValue(' diff --git a/classes/order/OrderState.php b/classes/order/OrderState.php index 2829f2ca2..19dddb875 100644 --- a/classes/order/OrderState.php +++ b/classes/order/OrderState.php @@ -112,7 +112,7 @@ class OrderStateCore extends ObjectModel */ public static function getOrderStates($id_lang) { - $cache_id = __CLASS__.__FUNCTION__.(int)$id_lang; + $cache_id = 'OrderState::getOrderStates_'.(int)$id_lang; if (!Cache::isStored($cache_id)) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index c8f72bef7..ee7dddcf7 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -187,7 +187,7 @@ class ShopCore extends ObjectModel public function setUrl() { - $cache_id = __CLASS__.__FUNCTION__.(int)$this->id; + $cache_id = 'Shop::setUrl_'.(int)$this->id; if (!Cache::isStored($cache_id)) { $row = Db::getInstance()->getRow(' diff --git a/classes/tax/TaxRule.php b/classes/tax/TaxRule.php index 0d778d6c0..b41d61fa1 100644 --- a/classes/tax/TaxRule.php +++ b/classes/tax/TaxRule.php @@ -124,7 +124,7 @@ class TaxRuleCore extends ObjectModel */ public static function isTaxInUse($id_tax) { - $cache_id = __CLASS__.__FUNCTION__.(int)$id_tax; + $cache_id = 'TaxRule::isTaxInUse_'.(int)$id_tax; if (!Cache::isStored($cache_id)) { $result = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'tax_rule` WHERE `id_tax` = '.(int)$id_tax); diff --git a/modules/productcomments/ProductComment.php b/modules/productcomments/ProductComment.php index 8518ebe0a..5887357b8 100644 --- a/modules/productcomments/ProductComment.php +++ b/modules/productcomments/ProductComment.php @@ -97,7 +97,7 @@ class ProductComment extends ObjectModel if ($n != null && $n <= 0) $n = 5; - $cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$p.'-'.(int)$n.'-'.(int)$id_customer.'-'.(bool)$validate; + $cache_id = 'ProductComment::getByProduct_'.(int)$id_product.'-'.(int)$p.'-'.(int)$n.'-'.(int)$id_customer.'-'.(bool)$validate; if (!Cache::isStored($cache_id)) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' @@ -124,7 +124,7 @@ class ProductComment extends ObjectModel */ public static function getByCustomer($id_product, $id_customer, $get_last = false, $id_guest = false) { - $cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$id_customer.'-'.(bool)$get_last.'-'.(int)$id_guest; + $cache_id = 'ProductComment::getByCustomer_'.(int)$id_product.'-'.(int)$id_customer.'-'.(bool)$get_last.'-'.(int)$id_guest; if (!Cache::isStored($cache_id)) { $results = Db::getInstance()->executeS(' @@ -214,7 +214,7 @@ class ProductComment extends ObjectModel if (!Validate::isUnsignedId($id_product)) die(Tools::displayError()); $validate = (int)Configuration::get('PRODUCT_COMMENTS_MODERATE'); - $cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.$validate; + $cache_id = 'ProductComment::getCommentNumber_'.(int)$id_product.'-'.$validate; if (!Cache::isStored($cache_id)) { $result = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' diff --git a/modules/productcomments/ProductCommentCriterion.php b/modules/productcomments/ProductCommentCriterion.php index 07ae1a134..e46775c0c 100644 --- a/modules/productcomments/ProductCommentCriterion.php +++ b/modules/productcomments/ProductCommentCriterion.php @@ -160,7 +160,7 @@ class ProductCommentCriterion extends ObjectModel $alias = 'ps'; } - $cache_id = __CLASS__.__FUNCTION__.(int)$id_product.'-'.(int)$id_lang; + $cache_id = 'ProductCommentCriterion::getByProduct_'.(int)$id_product.'-'.(int)$id_lang; if (!Cache::isStored($cache_id)) { $result = Db::getInstance()->executeS('