What I tried to do too is clearing the cache of the backend in my
frontend when the user log in. But I didn't achieve this. This was my
code:
class utilisateurActions extends sfActions
{
//...
public function clearBackendCache($uri, $host)
{
sfContext::switchTo('backend'); //switch to the environment youw
ish to clear
$cache = sfContext::getInstance()->getViewCacheManager();
$this->forward404Unless($cache);
if(is_array($uri))
{
foreach ($uri as $value)
{
$result = $cache->remove($value, $host);
}
}
else if(is_string($uri))
{
$result = $cache->remove($uri, $host);
}
sfContext::switchTo('frontend'); //switch back to the environment
you started from
return $result;
}
public function executeLogin(sfWebRequest $request)
{
//...
$this->clearBackendCache('forum/
index','backend.localhost');
}
//...
}
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en