For this kind of question, make sure to search in the documentation : http://www.symfony-project.org/jobeet/1_4/Doctrine/en/21#chapter_21_removing_the_cache_cache_removal
And / Or in the snippets : http://snippets.symfony-project.org/snippets/tagged/cache+clear/order_by/date <http://snippets.symfony-project.org/snippets/tagged/cache+clear/order_by/date>Also, in your code Michal, you don't need to call the sfContext singleton, just $this->getContext(). On Thu, Oct 7, 2010 at 5:25 PM, Eno <symb...@gmail.com> wrote: > On Thu, 7 Oct 2010, [ISO-8859-2] Micha³ Piotrowski wrote: > > > 2010/10/7 HAUSa <jeroen_heeft_behoefte_aan_r...@hotmail.com>: > > > Is there a way to clear my cache in an action, using PHP? > > > > $cacheManager = sfContext::getInstance()->getViewCacheManager(); > > if ($cacheManager) { > > > $cacheManager->remove('blog/index?username='.$username.'&sf_format=html'); > > > $cacheManager->remove('blog/index?username='.$username.'&sf_format=atom'); > > $cacheManager->remove('main/show?username='.$username); > > } > > If this isn't on an "admin" page, you probably should password-protect or > filter request by IP. > > > > -- > > > -- > 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 symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Damien ALEXANDRE -- 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 symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en