Changeset 7479
- Timestamp:
- 02/13/08 23:42:44 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dwhittle/1.1/lib/task/cache/sfCacheClearTask.class.php
r7416 r7479 151 151 } 152 152 } 153 $this->logSection('cache', 'cleared files'); 153 154 154 155 // clear apc cache 156 $this->logSection('cache', 'cleared apc'); 157 155 158 $cache = new sfAPCCache(array('prefix' => '')); 156 159 $cache->clean(sfAPCCache::ALL); 157 160 158 $this->dispatcher->notify(new sfEvent($this, 'command.log', array($this->formatter->formatSection('apc', 'cache removed')))); 161 // clear autoload cache 162 $this->logSection('cache', 'cleared autoload'); 159 163 160 // clear autoload cache161 164 foreach(sfFinder::type('file')->name('sf_autoload*')->maxdepth(0)->in(sfToolkit::getTmpDir()) as $file) 162 165 { 163 166 @unlink($file); 164 167 } 165 $this->dispatcher->notify(new sfEvent($this, 'command.log', array($this->formatter->formatSection('autoload', 'cache removed')))); 168 166 169 } 167 170 branches/dwhittle/1.1/lib/task/cache/sfCacheGenerateTask.class.php
r6276 r7479 78 78 require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.sfConfig::get('sf_apps_dir_name', 'apps').DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.sfConfig::get('sf_config_dir_name', 'config').DIRECTORY_SEPARATOR.'config.php'); 79 79 80 // hide any warnings - like sessions for prod environment 81 $error_reporting = error_reporting(0); 82 83 // generate configuration + view cache 80 84 $browser = new sfBrowser(); 81 $browser->initialize(array());82 85 foreach($uris as $uri) 83 86 { … … 85 88 } 86 89 87 $this->dispatcher->notify(new sfEvent($this, 'command.log', array($this->formatter->format(sprintf('cache generated for application "%s" in environment "%s"', $application, $environment), 'COMMENT')))); 90 // generate core_compile 91 sfConfigCache::getInstance()->checkConfig('config/core_compile.yml'); 92 93 error_reporting($error_reporting); 94 95 $this->logSection('cache', sprintf('generated cache for application "%s" in environment "%s"', $application, $environment)); 88 96 } 89 97 } branches/dwhittle/1.1/lib/task/cache/sfCacheOptimizeTask.class.php
r6276 r7479 74 74 file_put_contents($config, $optimizer->optimize()); 75 75 76 $this-> dispatcher->notify(new sfEvent($this, 'command.log', array($this->formatter->format(sprintf('optimized cache for application "%s" in environment "%s"', $application, $environment), 'COMMENT'))));76 $this->logSection('cache', sprintf('optimized cache for application "%s" in environment "%s"', $application, $environment)); 77 77 } 78 78 }

