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

[-] BO : Fix issue with smarty lazy cache & timestamp (PSCSX-6601) #3836

Merged
merged 2 commits into from Aug 28, 2015
Jump to file or symbol
Failed to load files and symbols.
+5 −3
Diff settings

Always

Just for now

View
@@ -44,7 +44,7 @@ public function __construct()
public function clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null)
{
if ($resource_name == null) {
Db::getInstance()->execute('REPLACE INTO `'._DB_PREFIX_.'smarty_last_flush` (`type`, `last_flush`) VALUES (\'compile\', \''.date('Y-m-d H:i:s').'\')');
Db::getInstance()->execute('REPLACE INTO `'._DB_PREFIX_.'smarty_last_flush` (`type`, `last_flush`) VALUES (\'compile\', FROM_UNIXTIME('.time().'))');
return 0;
} else {
return parent::clearCompiledTemplate($resource_name, $compile_id, $exp_time);
@@ -61,7 +61,7 @@ public function clearCompiledTemplate($resource_name = null, $compile_id = null,
*/
public function clearAllCache($exp_time = null, $type = null)
{
Db::getInstance()->execute('REPLACE INTO `'._DB_PREFIX_.'smarty_last_flush` (`type`, `last_flush`) VALUES (\'template\', \''.date('Y-m-d H:i:s').'\')');
Db::getInstance()->execute('REPLACE INTO `'._DB_PREFIX_.'smarty_last_flush` (`type`, `last_flush`) VALUES (\'template\', FROM_UNIXTIME('.time().'))');
return $this->delete_from_lazy_cache(null, null, null);
}
@@ -27,4 +27,6 @@ REPLACE INTO `PREFIX_tag_count` (id_group, id_tag, id_lang, id_shop, counter)
JOIN (SELECT DISTINCT id_shop FROM `PREFIX_shop`) ps
WHERE product_shop.`active` = 1
AND product_shop.id_shop = ps.id_shop
GROUP BY pt.id_tag, pt.id_lang, ps.id_shop;
GROUP BY pt.id_tag, pt.id_lang, ps.id_shop;
TRUNCATE TABLE `PREFIX_smarty_last_flush`;
ProTip! Use n and p to navigate between commits in a pull request.