protected function execute($arguments = array(), $options = array())
 {
     // initialize the database connection
     $databaseManager = new sfDatabaseManager($this->configuration);
     $connection = $databaseManager->getDatabase($options['connection'] ? $options['connection'] : null)->getConnection();
     $nbAssets = DbFinder::from('sfCombine')->delete();
     sfProcessCache::clear();
 }
    }

    public function has($key)
    {
      return $this->cache->has($key);
    }

    public function clear()
    {
      return $this->cache->clean();
    }
  }
}


$cache = new sfProcessCache();

$t->diag('useCache()');

// Simple queries

$cache->clear();

$finder = DbFinder::from('Article');
$finder = $finder->where('Title', 'foo')->limit(1);
$key = $finder->getUniqueIdentifier();
$finder->findOne();
$t->is($cache->get($key), null, 'No cache is set until the cache is enabled');
$finder = $finder->where('Title', 'foo')->limit(1)->useCache($cache, 10);
$finder->findOne();
$t->isnt($cache->get($key), null, 'useCache() activates query caching on simple find() queries');
 /**
  * Checks to see if a configuration file has been modified and if so
  * recompile the cache file associated with it.
  *
  * The recompilation only occurs in a non debug environment.
  *
  * If the configuration file path is relative, symfony will look in directories 
  * defined in the sfLoader::getConfigPaths() method.
  *
  * @param string A filesystem path to a configuration file
  *
  * @return string An absolute filesystem path to the cache filename associated with this specified configuration file
  *
  * @throws <b>sfConfigurationException</b> If a requested configuration file does not exist
  *
  * @see sfLoader::getConfigPaths()
  */
 public function checkConfig($configPath, $optional = false)
 {
     static $process_cache_cleared = false;
     if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) {
         $timer = sfTimerManager::getTimer('Configuration');
     }
     // the cache filename we'll be using
     $cache = $this->getCacheName($configPath);
     if (sfConfig::get('sf_in_bootstrap') && is_readable($cache)) {
         if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) {
             $timer->addTime();
         }
         return $cache;
     }
     if (!sfToolkit::isPathAbsolute($configPath)) {
         $files = sfLoader::getConfigPaths($configPath);
     } else {
         $files = is_readable($configPath) ? array($configPath) : array();
     }
     if (!isset($files[0])) {
         if ($optional) {
             return null;
         }
         // configuration does not exist
         $error = sprintf('Configuration "%s" does not exist or is unreadable', $configPath);
         throw new sfConfigurationException($error);
     }
     // find the more recent configuration file last modification time
     $mtime = 0;
     foreach ($files as $file) {
         if (filemtime($file) > $mtime) {
             $mtime = filemtime($file);
         }
     }
     if (!is_readable($cache) || $mtime > filemtime($cache)) {
         // configuration has changed so we need to reparse it
         $this->callHandler($configPath, $files, $cache);
         // clear process cache
         if ('config/config_handlers.yml' != $configPath && sfConfig::get('sf_use_process_cache') && !$process_cache_cleared) {
             sfProcessCache::clear();
             $process_cache_cleared = true;
         }
     }
     if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) {
         $timer->addTime();
     }
     return $cache;
 }
 public function clear()
 {
     sfProcessCache::clear();
 }
 public function get($key)
 {
     return sfProcessCache::get($key);
 }
 public static function setConfigValueFor($input, $value)
 {
     $prefix = sfConfig::get('app_phpbb_prefix', 'Phpbb');
     $c = new Criteria();
     avrPropelTools::criteriaAdd($c, $prefix . 'Config', 'config_name', $input);
     $newestUserConfig = avrPropelTools::invokePeerMethod($prefix . 'Config', 'doSelectOne', $c);
     $newestUserConfig->setConfigValue($value);
     $newestUserConfig->save();
     sfProcessCache::delete('config_values');
     sfProcessCache::delete('config_values_dynamic');
 }
/**
 * Returns a key which combined all assets file
 *
 * @return string md5
 */
function _get_key($files)
{
    $content = base64_encode(serialize($files));
    $key = md5($content . sfConfig::get('app_sfCombine_asset_version', ''));
    if (!class_exists('DbFinder')) {
        throw new Exception('sfCombine expects DbFinder to call combined asset file');
    }
    $keyExists = DbFinder::from('sfCombine')->where('AssetsKey', $key)->count();
    if (!$keyExists) {
        $combine = new sfCombine();
        $combine->setAssetsKey($key);
        $combine->setFiles($content);
        $combine->save();
    }
    // Checks if key exists
    if (!sfProcessCache::has($key)) {
        sfProcessCache::set($key, true);
    }
    return $key;
}