Closed Bug 1364285 Opened 7 years ago Closed 5 years ago

Cache user settings in memcached (extracted from bug 1021795)

Categories

(bugzilla.mozilla.org :: General, enhancement)

Production
enhancement
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: dylan, Assigned: dylan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Carrying forward dkl's r+ from bug 1021795
Attachment #8867028 - Flags: review+
Comment on attachment 8867028 [details] [diff] [review]
user_settings_cache_1.patch

I would feel bad just pushing this forward based on the very old review. Can you provide a quick sanity check? I think maybe we should be clearing this cache key explicitly.
Attachment #8867028 - Flags: feedback?(glob)
Comment on attachment 8867028 [details] [diff] [review]
user_settings_cache_1.patch

Review of attachment 8867028 [details] [diff] [review]:
-----------------------------------------------------------------

::: Bugzilla/User/Setting.pm
@@ +179,3 @@
>      my $dbh = Bugzilla->dbh;
>  
> +    my $cache_key = "user_settings_all.$user_id";

clear_settings_cache() needs its cache_key updated too

@@ +180,5 @@
>  
> +    my $cache_key = "user_settings_all.$user_id";
> +    my $settings = Bugzilla->memcached->get_config({ key => $cache_key });
> +    return $settings if $settings;
> +    

whitespace

@@ +186,5 @@
> +        q{SELECT name, default_value, is_enabled, setting_value, subclass, category
> +            FROM setting
> +    LEFT JOIN profile_setting
> +                ON setting.name = profile_setting.setting_name
> +                AND profile_setting.user_id = ?}, undef, ($user_id));

indentation of the LEFT JOIN line needs fixing
Attachment #8867028 - Flags: feedback?(glob) → feedback-
Type: defect → enhancement
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: