From 84da5fc90f0cd2a278e9947c1ffbf24ea3e29874 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 6 Jan 2006 02:10:43 +0000 Subject: [PATCH] Save cache after the shutdown hook runs. fixes #2232 git-svn-id: http://svn.automattic.com/wordpress/trunk@3411 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/cache.php | 2 ++ wp-settings.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/cache.php b/wp-includes/cache.php index dfe73f7298..7c623d1e96 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -333,6 +333,8 @@ class WP_Object_Cache { } } + $this->dirty_objects = array(); + // Release write lock. flock($mutex, LOCK_UN); fclose($mutex); diff --git a/wp-settings.php b/wp-settings.php index de8d065f4a..2797ba7f3a 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -222,8 +222,8 @@ if ( file_exists(TEMPLATEPATH . "/functions.php") ) include(TEMPLATEPATH . "/functions.php"); function shutdown_action_hook() { - wp_cache_close(); do_action('shutdown'); + wp_cache_close(); } register_shutdown_function('shutdown_action_hook');