30.12.09 - Symfony, clear cache from an action
0 comments
Simply PHP function to remove the cache from an action
For application and environment clear cache:
/**
* Delete cache for application and environment
*
* @param string $app aplicación
* @param string $env entorno
*/
function clear_cache ($app, $env)
{
$cacheDir = sfConfig::get('sf_cache_dir').'/'. $app.'/'.$env.'/';
//Clear cache
$cache = new sfFileCache(array('cache_dir' => $cacheDir));
$cache->clean();
}
* Delete cache for application and environment
*
* @param string $app aplicación
* @param string $env entorno
*/
function clear_cache ($app, $env)
{
$cacheDir = sfConfig::get('sf_cache_dir').'/'. $app.'/'.$env.'/';
//Clear cache
$cache = new sfFileCache(array('cache_dir' => $cacheDir));
$cache->clean();
}
Comments
There are no comments jet. Be the first to comment!
