Code snippets for symfony 1.x

Navigation

Clearing the cache of another application

This is a bit of a hack, but at least it makes it possible to clear the cache across applications

sfToolkit::clearDirectory(
  sfConfig::get('sf_root_dir').'/cache/'.$app_name.'/templates/path/to/page/in/cache'
);

It is not using an internal URI, of course, since for now an application cannot know another application's routing rules.

If you don't include any path to a page in cache, the whole template cache is cleared.

by Francois Zaninotto on 2006-09-29, tagged cache