diff options
author | Byron Jones <bjones@mozilla.com> | 2014-03-04 08:50:54 +0100 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2014-03-04 08:50:54 +0100 |
commit | 9193214274889f2b7636146e72d8200e9bfaeb7b (patch) | |
tree | e570cc86aa8df53dd0e7e9d902d88450c5dc25c7 /extensions/UserProfile | |
parent | 75eaf0d6c8ecf764d73cb870e504e84826d44751 (diff) | |
download | bugzilla-9193214274889f2b7636146e72d8200e9bfaeb7b.tar.gz bugzilla-9193214274889f2b7636146e72d8200e9bfaeb7b.tar.xz |
Bug 966180: backport bug 956233 to bmo (enable USE_MEMCACHE on most objects)
Diffstat (limited to 'extensions/UserProfile')
-rw-r--r-- | extensions/UserProfile/Extension.pm | 2 | ||||
-rwxr-xr-x | extensions/UserProfile/bin/update.pl | 1 | ||||
-rw-r--r-- | extensions/UserProfile/lib/Util.pm | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/extensions/UserProfile/Extension.pm b/extensions/UserProfile/Extension.pm index 673c0c2a1..efd83591d 100644 --- a/extensions/UserProfile/Extension.pm +++ b/extensions/UserProfile/Extension.pm @@ -45,6 +45,7 @@ sub _user_set_last_activity_ts { "UPDATE profiles SET last_activity_ts = ? WHERE userid = ?", undef, $value, $self->id); + Bugzilla->memcached->clear({ table => 'profiles', id => $self->id }); } sub _user_clear_last_statistics_ts { @@ -56,6 +57,7 @@ sub _user_clear_last_statistics_ts { "UPDATE profiles SET last_statistics_ts = NULL WHERE userid = ?", undef, $self->id); + Bugzilla->memcached->clear({ table => 'profiles', id => $self->id }); } # diff --git a/extensions/UserProfile/bin/update.pl b/extensions/UserProfile/bin/update.pl index 457585f8d..2a4997aee 100755 --- a/extensions/UserProfile/bin/update.pl +++ b/extensions/UserProfile/bin/update.pl @@ -50,6 +50,7 @@ if (@$user_ids) { last_user_activity($user_id), $user_id ); + Bugzilla->memcached->clear({ table => 'profiles', id => $user_id }); } $dbh->do( "DELETE FROM profiles_statistics_recalc WHERE " . $dbh->sql_in('user_id', $user_ids) diff --git a/extensions/UserProfile/lib/Util.pm b/extensions/UserProfile/lib/Util.pm index b5550bdc1..71d0e6501 100644 --- a/extensions/UserProfile/lib/Util.pm +++ b/extensions/UserProfile/lib/Util.pm @@ -171,6 +171,9 @@ EOF $dbh->do( "UPDATE profiles SET last_statistics_ts=NULL WHERE " . $dbh->sql_in('userid', $user_ids) ); + foreach my $id (@$user_ids) { + Bugzilla->memcached->clear({ table => 'profiles', id => $id }); + } return scalar(@$user_ids); } @@ -209,6 +212,7 @@ sub _set_last_statistics_ts { undef, $timestamp, $user_id, ); + Bugzilla->memcached->clear({ table => 'profiles', id => $user_id }); } sub _update_statistics { |