Removing cache hits, as App::core() is almost always called before Cache is initialized, as Cache uses App::core to load the first configured engine. This Cache::read call can never succeed so it should be removed.

This commit is contained in:
mark_story 2010-11-21 23:01:26 -05:00
parent fdcfd03340
commit 2d21e9c331

View file

@ -324,9 +324,6 @@ class App {
*/
public static function core($type = null) {
static $paths = false;
if ($paths === false) {
$paths = Cache::read('core_paths', '_cake_core_');
}
if (!$paths) {
$paths = array();
$libs = dirname(__FILE__) . DS;
@ -347,8 +344,6 @@ class App {
$paths['shells'][] = $cake . 'console' . DS . 'shells' . DS;
// Provide BC path to vendors/shells
$paths['shells'][] = $path . 'vendors' . DS . 'shells' . DS;
Cache::write('core_paths', array_filter($paths), '_cake_core_');
}
if ($type && isset($paths[$type])) {
return $paths[$type];