mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Save cache after the shutdown hook runs. fixes #2232
git-svn-id: http://svn.automattic.com/wordpress/trunk@3411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
02089fb5f2
commit
84da5fc90f
@ -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);
|
||||||
|
@ -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');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user