I tried the method described here, but it doesn't work...
http://www.symfony-project.org/book/1_2/12-Caching#chapter_12_sub_clearing_cache_across_applications_new_in_symfony_1_1

I define this method in backenConfiguration.class.php:
public function getFrontendCache()
{
  if (!$this->frontendCache)
  {
    $this->frontendCache = new sfFileCache(array(
      'cache_dir' => sfConfig::get('sf_cache_dir').'/
frontend/'.sfConfig::get('sf_environment').'/template'
    ));
  }
  return $this->frontendCache;
}

and override the processForm method of the admin-generated module
protected function processForm(sfWebRequest $request, sfForm $form)
{
  // ... bla, bla, bla
  if ($form->isValid())
  {
    // ... bla, bla, bla

    $news_article = $form->save();
    $cache = sfProjectConfiguration::getActive()->getFrontendCache();
    $result = $cache->removePattern('/news/index?sf_culture=*');

    // ... bla, bla, bla
  }
}

The cache is never cleared...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to