summaryrefslogtreecommitdiff
path: root/db-prefs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-11 00:55:02 +0400
committerAndrew Dolgov <[email protected]>2011-11-11 00:55:02 +0400
commitc648997b1cadc09840ee42b450dc4859259695fe (patch)
tree0ba6fe64956dba37a4cc349c13278b0c25acf281 /db-prefs.php
parentd0cafcf4a048bfcc72d9523d20d61ba719e566cd (diff)
more aggressive prefs caching
Diffstat (limited to 'db-prefs.php')
-rw-r--r--db-prefs.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/db-prefs.php b/db-prefs.php
index cf941cebe..7a522d6ad 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;
+ }
+ }
}
}