Closed
Bug 993926
Opened 10 years ago
Closed 10 years ago
Bugzilla::User::Setting::get_all_settings() should use memcached
Categories
(Bugzilla :: Bugzilla-General, enhancement, P1)
Bugzilla
Bugzilla-General
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: glob, Assigned: glob)
Details
(Keywords: bmo-goal, perf)
Attachments
(1 file)
4.72 KB,
patch
|
mail
:
review+
|
Details | Diff | Splinter Review |
due to the gravatar extension on BMO, $user->settings() is called for each commenter. this results in frequent database calls for data that changes very infrequently, making it an ideal candidate for memcached. changes required: - during an update in editsettings.cgi call Bugzilla->memcached->clear_config() - update Bugzilla::User::Settings: - update get_all_settings($user_id) - build a cache key as "user_settings.$user_id" - check the cache with Bugzilla->memcached->get_config($key) and return if found - if not found, query the database and store with memcached->set_config() - add a method clear_settings_cache($user_id) - calls memcached->clear({ key => $key }) using the same key as get_all_settings() - call clear_settings_cache() from userprefs.cgi::SaveSettings() i'm not totally comfortable with clear_settings_cache(), however the way settings have been implemented makes abstraction difficult (the settings hashref inside the user object is updated directly by userprefs.cgi, and using a tied hashref would be an overkill).
Updated•10 years ago
|
Severity: normal → enhancement
Attachment #8444484 -
Flags: review?(sgreen)
Updated•10 years ago
|
Priority: -- → P1
Updated•10 years ago
|
Attachment #8444484 -
Flags: review?(sgreen) → review+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 8b98912..c19dc4f master -> master
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: approval+
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 5.0
You need to log in
before you can comment on or make changes to this bug.
Description
•