From 600b71019494e1c29898a620e58c0d2602f37b74 Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 24 Nov 2006 16:16:44 +0000 Subject: WP Merge to 4524 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@810 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/cache.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'wp-includes/cache.php') diff --git a/wp-includes/cache.php b/wp-includes/cache.php index 3a48521..6880624 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -30,9 +30,7 @@ function wp_cache_get($id, $flag = '') { } function wp_cache_init() { - global $wp_object_cache; - - $wp_object_cache = new WP_Object_Cache(); + $GLOBALS['wp_object_cache'] =& new WP_Object_Cache(); } function wp_cache_replace($key, $data, $flag = '', $expire = 0) { @@ -67,7 +65,7 @@ class WP_Object_Cache { var $secret = ''; function acquire_lock() { - // Acquire a write lock. + // Acquire a write lock. $this->mutex = @fopen($this->cache_dir.$this->flock_filename, 'w'); if ( false == $this->mutex) return false; @@ -260,11 +258,11 @@ class WP_Object_Cache { while ($index < count($stack)) { # Get indexed directory from stack $dir = $stack[$index]; - + $dh = @ opendir($dir); if (!$dh) return false; - + while (($file = @ readdir($dh)) !== false) { if ($file == '.' or $file == '..') continue; -- cgit