Hello,
Actually, I display some content in frontend only when admins are logged in for example in category page.
In a CategoryController.php, I test a cookie admin
$cookie = new Cookie('psAdmin');
if this cookie is an admin cookie, I assign a variable to smarty.
$this->context->smarty->assign('specialInfo', $infoForAdminOnly);
in the smarty template I display this content if the variable specialInfo is set.
{if !empty($specialInfo)}{$specialInfo}{/if}
Without the LS Cache module, once the admin is not logged, the specialInfo content disappears.
With the LS Cache module, the specialInfo content continues to appear.
So is it possible to ignore these special parts from cache?
I was thinking to use ESI blocks but from what I understand it only works on module parts. Is it correct?
Actually, I display some content in frontend only when admins are logged in for example in category page.
In a CategoryController.php, I test a cookie admin
$cookie = new Cookie('psAdmin');
if this cookie is an admin cookie, I assign a variable to smarty.
$this->context->smarty->assign('specialInfo', $infoForAdminOnly);
in the smarty template I display this content if the variable specialInfo is set.
{if !empty($specialInfo)}{$specialInfo}{/if}
Without the LS Cache module, once the admin is not logged, the specialInfo content disappears.
With the LS Cache module, the specialInfo content continues to appear.
So is it possible to ignore these special parts from cache?
I was thinking to use ESI blocks but from what I understand it only works on module parts. Is it correct?