From: Andrew Dolgov Date: Thu, 10 Nov 2011 20:55:02 +0000 (+0400) Subject: more aggressive prefs caching X-Git-Tag: 1.5.7~28 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c648997b1cadc09840ee42b450dc4859259695fe;p=tt-rss.git more aggressive prefs caching --- diff --git a/db-prefs.php b/db-prefs.php index cf941ceb..7a522d6a 100644 --- a/db-prefs.php +++ b/db-prefs.php @@ -18,7 +18,7 @@ @$profile = $_SESSION["profile"]; } else { $user_id = sprintf("%d", $user_id); - $prefs_cache = false; + //$prefs_cache = false; } if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) { @@ -130,7 +130,12 @@ $profile_qpart AND owner_uid = " . $_SESSION["uid"]); - $_SESSION["prefs_cache"] = array(); + if (!defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) { + if ($user_id = $_SESSION["uid"]) { + $_SESSION["prefs_cache"][$pref_name]["type"] = $type_name; + $_SESSION["prefs_cache"][$pref_name]["value"] = $value; + } + } } } diff --git a/functions.php b/functions.php index 275bc4d8..40e58376 100644 --- a/functions.php +++ b/functions.php @@ -2102,6 +2102,8 @@ } function login_sequence($link, $mobile = false) { + $_SESSION["prefs_cache"] = array(); + if (!SINGLE_USER_MODE) { $login_action = $_POST["login_action"];