diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-28 15:38:39 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-28 15:38:39 -0800 |
commit | e3e72ca4da0375d88b86ba69b6596b10be164e23 (patch) | |
tree | f32855f9416252b474ab8d598a345fdcf1455b7d /system | |
parent | f28b80fcf43e02ca65f419eb6774321dc30a2a37 (diff) | |
parent | fd94f4bec21a7deaa86d468da704a048d2be751e (diff) |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Kohana.php | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/system/core/Kohana.php b/system/core/Kohana.php index ae056d0e..f7f6b326 100644 --- a/system/core/Kohana.php +++ b/system/core/Kohana.php @@ -32,6 +32,7 @@ abstract class Kohana_Core { // Include paths protected static $include_paths; + protected static $include_paths_hash = ''; // Cache lifetime protected static $cache_lifetime; @@ -365,14 +366,7 @@ abstract class Kohana_Core { // Add SYSPATH as the last path Kohana::$include_paths[] = SYSPATH; - // Clear cached include paths - self::$internal_cache['find_file_paths'] = array(); - if ( ! isset(self::$write_cache['find_file_paths'])) - { - // Write cache at shutdown - self::$write_cache['find_file_paths'] = TRUE; - } - + Kohana::$include_paths_hash = md5(serialize(Kohana::$include_paths)); } return Kohana::$include_paths; @@ -766,8 +760,8 @@ abstract class Kohana_Core { // Search path $search = $directory.'/'.$filename.$ext; - if (isset(Kohana::$internal_cache['find_file_paths'][$search])) - return Kohana::$internal_cache['find_file_paths'][$search]; + if (isset(Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search])) + return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search]; // Load include paths $paths = Kohana::$include_paths; @@ -824,7 +818,7 @@ abstract class Kohana_Core { Kohana::$write_cache['find_file_paths'] = TRUE; } - return Kohana::$internal_cache['find_file_paths'][$search] = $found; + return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search] = $found; } /** |