Hi,
I am using the Cage Cache Filter for my Site Controller.
public function filters()
{
return array(
array(
'COutputCache + page, index',
'duration' => 100,
'varyByParam' => array('view'),
'varyBySession' => true,
),
);
}
I modified my login and logout with session regenerate, so varyBySession works
function actionLogin()
{
....
Yii::app()->session->regenerateID(true);
....
}
public function actionLogout()
{
Yii::app()->user->logout();
Yii::app()->session->regenerateID(true);
$this->redirect(Yii::app()->homeUrl);
}
This works great for the following:
-
Enter the site anonymous
-
see logged out state navigation
-
login
-
see logged in state navigation
But if I now logout the navigations stays in the logged in state? What’s wrong?
P.S.: How can I make the [code]-Tag highlight my PHP snippets?
P.P.S.: Forget that one, this works after posting but not in post preview