Enabled phpunit, updates for ab_setup, enabled APC, and other todos

This commit is contained in:
Deon George
2012-08-23 20:14:46 +10:00
parent 878c159e3a
commit 23247a5d4e
8 changed files with 53 additions and 27 deletions

View File

@@ -148,4 +148,12 @@ Route::set('default', '(<controller>(/<action>(/<id>)))', array('id' => '[a-zA-Z
'controller' => 'welcome',
'action' => 'index',
));
/**
* If APC is enabled, and we need to clear the cache
*/
if (file_exists(APPPATH.'CLEAR_APC_CACHE') AND function_exists('apc_clear_cache') AND ! Kohana::$is_cli) {
if (! apc_clear_cache() OR ! unlink(APPPATH.'CLEAR_APC_CACHE'))
throw new Kohana_Exception('Unable to clear the APC cache.');
}
?>