Save cache after the shutdown hook runs. fixes #2232

git-svn-id: https://develop.svn.wordpress.org/trunk@3411 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-01-06 02:10:43 +00:00
parent c4ba2f4bfe
commit 915517c4f2
2 changed files with 3 additions and 1 deletions

View File

@ -333,6 +333,8 @@ class WP_Object_Cache {
} }
} }
$this->dirty_objects = array();
// Release write lock. // Release write lock.
flock($mutex, LOCK_UN); flock($mutex, LOCK_UN);
fclose($mutex); fclose($mutex);

View File

@ -222,8 +222,8 @@ if ( file_exists(TEMPLATEPATH . "/functions.php") )
include(TEMPLATEPATH . "/functions.php"); include(TEMPLATEPATH . "/functions.php");
function shutdown_action_hook() { function shutdown_action_hook() {
wp_cache_close();
do_action('shutdown'); do_action('shutdown');
wp_cache_close();
} }
register_shutdown_function('shutdown_action_hook'); register_shutdown_function('shutdown_action_hook');