summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-02-21 23:57:29 -0800
committerAndy Staudacher <andy.st@gmail.com>2010-02-21 23:57:29 -0800
commitff9129c59850277c3079edd19b8a0f7ac4d70056 (patch)
tree237e0af4204fedb7d5242f11f7b7291edb19fc8f /system
parent334cd2368de24a76cd49681a14295350e85714d0 (diff)
Revert "Fix Kohana's internal cache for Gallery's usage pattern."
Waiting for feedback from Kohana devevelopers before applying the patch to Gallery 3. This reverts commit 336c3bd264b4af2ab74fe1262366ad6f2e705451.
Diffstat (limited to 'system')
-rw-r--r--system/core/Kohana.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/system/core/Kohana.php b/system/core/Kohana.php
index f7f6b326..ae056d0e 100644
--- a/system/core/Kohana.php
+++ b/system/core/Kohana.php
@@ -32,7 +32,6 @@ abstract class Kohana_Core {
// Include paths
protected static $include_paths;
- protected static $include_paths_hash = '';
// Cache lifetime
protected static $cache_lifetime;
@@ -366,7 +365,14 @@ abstract class Kohana_Core {
// Add SYSPATH as the last path
Kohana::$include_paths[] = SYSPATH;
- Kohana::$include_paths_hash = md5(serialize(Kohana::$include_paths));
+ // 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;
+ }
+
}
return Kohana::$include_paths;
@@ -760,8 +766,8 @@ abstract class Kohana_Core {
// Search path
$search = $directory.'/'.$filename.$ext;
- 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];
+ if (isset(Kohana::$internal_cache['find_file_paths'][$search]))
+ return Kohana::$internal_cache['find_file_paths'][$search];
// Load include paths
$paths = Kohana::$include_paths;
@@ -818,7 +824,7 @@ abstract class Kohana_Core {
Kohana::$write_cache['find_file_paths'] = TRUE;
}
- return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search] = $found;
+ return Kohana::$internal_cache['find_file_paths'][$search] = $found;
}
/**