[*] MO: Add smarty cache on some modules

This commit is contained in:
Rémi Gaillard
2013-01-07 17:09:36 +01:00
parent 1f7ab4f172
commit cd89916a20
14 changed files with 136 additions and 95 deletions
+8 -7
View File
@@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
@@ -64,6 +64,7 @@ class Blockcontact extends Module
{
Configuration::updateValue('blockcontact_telnumber', Tools::getValue('telnumber'));
Configuration::updateValue('blockcontact_email', Tools::getValue('email'));
$this->_clearCache('blockcontact.tpl');
$html .= '<div class="conf confirm">'.$this->l('Configuration updated').'</div>';
}
@@ -94,12 +95,12 @@ class Blockcontact extends Module
public function hookDisplayRightColumn()
{
global $smarty;
$smarty->assign(array(
'telnumber' => Configuration::get('blockcontact_telnumber'),
'email' => Configuration::get('blockcontact_email')
));
return $this->display(__FILE__, 'blockcontact.tpl');
if (!$this->isCached('blockcontact.tpl', $this->getCacheId()))
$smarty->assign(array(
'telnumber' => Configuration::get('blockcontact_telnumber'),
'email' => Configuration::get('blockcontact_email')
));
return $this->display(__FILE__, 'blockcontact.tpl', $this->getCacheId());
}
public function hookDisplayLeftColumn()