summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-02-28 16:04:47 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-02-28 16:06:36 -0800
commit835027bdb6e5646250d29529168359ad40e9d5f1 (patch)
tree37b9b407847b92e2cced7867d3b40f27df384de8
parentc91408d4a8b56730fde39df5e12d32111ace28b4 (diff)
The vendor branch is being updated, so this reverts the revert of
commit c91408d4a8b56730fde39df5e12d32111ace28b4.
-rw-r--r--system/core/Kohana.php16
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;
}
/**