diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-03-19 22:03:45 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-03-19 22:03:45 +0000 |
commit | 104430e9e1e8dacd5e4320e29e59fc59aa5c6ee9 (patch) | |
tree | 5aa678433770199f1958f36c88894f377516293f /system | |
parent | a58aa6e97b0e44adf7a878db6e276b081e202192 (diff) | |
parent | 0e9c626684fff0973a8512d5bd50ab7ba3a748ff (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
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; } /** |