From 693fd1774ecb6a9e1640887b8af2e8900bf3f068 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 25 Mar 2009 20:03:57 +0000 Subject: [PATCH] Make random_seed a transient git-svn-id: http://svn.automattic.com/wordpress/trunk@10838 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 7800527135..cb99ea4585 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1411,7 +1411,7 @@ if ( !function_exists('wp_rand') ) : function wp_rand( $min = 0, $max = 0 ) { global $rnd_value; - $seed = get_option('random_seed'); + $seed = get_transient('random_seed'); // Reset $rnd_value after 14 uses // 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value @@ -1420,7 +1420,7 @@ function wp_rand( $min = 0, $max = 0 ) { $rnd_value .= sha1($rnd_value); $rnd_value .= sha1($rnd_value . $seed); $seed = md5($seed . $rnd_value); - update_option('random_seed', $seed); + set_transient('random_seed', $seed); } // Take the first 8 digits for our value