summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2014-03-04 08:50:54 +0100
committerByron Jones <bjones@mozilla.com>2014-03-04 08:50:54 +0100
commit9193214274889f2b7636146e72d8200e9bfaeb7b (patch)
treee570cc86aa8df53dd0e7e9d902d88450c5dc25c7 /extensions
parent75eaf0d6c8ecf764d73cb870e504e84826d44751 (diff)
downloadbugzilla-9193214274889f2b7636146e72d8200e9bfaeb7b.tar.gz
bugzilla-9193214274889f2b7636146e72d8200e9bfaeb7b.tar.xz
Bug 966180: backport bug 956233 to bmo (enable USE_MEMCACHE on most objects)
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ContributorEngagement/Extension.pm2
-rw-r--r--extensions/EditComments/Extension.pm1
-rw-r--r--extensions/FlagDefaultRequestee/Extension.pm1
-rw-r--r--extensions/Push/lib/BacklogMessage.pm1
-rw-r--r--extensions/Push/lib/Backoff.pm1
-rw-r--r--extensions/Push/lib/LogEntry.pm1
-rw-r--r--extensions/Push/lib/Message.pm1
-rw-r--r--extensions/Review/Extension.pm1
-rw-r--r--extensions/Review/lib/Util.pm1
-rw-r--r--extensions/TagNewUsers/Extension.pm2
-rw-r--r--extensions/UserProfile/Extension.pm2
-rwxr-xr-xextensions/UserProfile/bin/update.pl1
-rw-r--r--extensions/UserProfile/lib/Util.pm4
13 files changed, 19 insertions, 0 deletions
diff --git a/extensions/ContributorEngagement/Extension.pm b/extensions/ContributorEngagement/Extension.pm
index 0e86eb4ca..aa8804034 100644
--- a/extensions/ContributorEngagement/Extension.pm
+++ b/extensions/ContributorEngagement/Extension.pm
@@ -39,6 +39,7 @@ sub install_update_db {
_populate_first_reviewed_ids();
}
}
+
sub _populate_first_reviewed_ids {
my $dbh = Bugzilla->dbh;
@@ -96,6 +97,7 @@ sub flag_end_of_update {
Bugzilla->dbh->do("UPDATE profiles SET first_patch_reviewed_id = ? WHERE userid = ?",
undef, $attachment->id, $attachment->attacher->id);
+ Bugzilla->memcached->clear({ table => 'profiles', id => $$attachment->attacher->id });
last;
}
}
diff --git a/extensions/EditComments/Extension.pm b/extensions/EditComments/Extension.pm
index 7396c6f28..a3769544f 100644
--- a/extensions/EditComments/Extension.pm
+++ b/extensions/EditComments/Extension.pm
@@ -226,6 +226,7 @@ sub bug_end_of_update {
$dbh->do("UPDATE longdescs SET thetext = ?, edit_count = edit_count + 1
WHERE comment_id = ?",
undef, $new_comment, $comment_id);
+ Bugzilla->memcached->clear({ table => 'longdescs', id => $comment_id });
# Log old comment to the longdescs activity table
$timestamp ||= $dbh->selectrow_array("SELECT NOW()");
diff --git a/extensions/FlagDefaultRequestee/Extension.pm b/extensions/FlagDefaultRequestee/Extension.pm
index 9c15f741a..0ab599cd3 100644
--- a/extensions/FlagDefaultRequestee/Extension.pm
+++ b/extensions/FlagDefaultRequestee/Extension.pm
@@ -121,6 +121,7 @@ sub _set_default_requestee {
$dbh->do("UPDATE flagtypes SET default_requestee = ? WHERE id = ?",
undef, $requestee_id, $type->id);
+ Bugzilla->memcached->clear({ table => 'flagtypes', id => $type->id });
}
##################
diff --git a/extensions/Push/lib/BacklogMessage.pm b/extensions/Push/lib/BacklogMessage.pm
index 8f5263038..cd40ebefb 100644
--- a/extensions/Push/lib/BacklogMessage.pm
+++ b/extensions/Push/lib/BacklogMessage.pm
@@ -15,6 +15,7 @@ use base 'Bugzilla::Object';
use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
use constant AUDIT_REMOVES => 0;
+use constant USE_MEMCACHED => 0;
use Bugzilla;
use Bugzilla::Error;
diff --git a/extensions/Push/lib/Backoff.pm b/extensions/Push/lib/Backoff.pm
index 05ee0a775..55552e5e1 100644
--- a/extensions/Push/lib/Backoff.pm
+++ b/extensions/Push/lib/Backoff.pm
@@ -15,6 +15,7 @@ use base 'Bugzilla::Object';
use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
use constant AUDIT_REMOVES => 0;
+use constant USE_MEMCACHED => 0;
use Bugzilla;
use Bugzilla::Util;
diff --git a/extensions/Push/lib/LogEntry.pm b/extensions/Push/lib/LogEntry.pm
index 303c19da4..848df0480 100644
--- a/extensions/Push/lib/LogEntry.pm
+++ b/extensions/Push/lib/LogEntry.pm
@@ -15,6 +15,7 @@ use base 'Bugzilla::Object';
use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
use constant AUDIT_REMOVES => 0;
+use constant USE_MEMCACHED => 0;
use Bugzilla;
use Bugzilla::Error;
diff --git a/extensions/Push/lib/Message.pm b/extensions/Push/lib/Message.pm
index ebe32d0ea..6d2ed2531 100644
--- a/extensions/Push/lib/Message.pm
+++ b/extensions/Push/lib/Message.pm
@@ -15,6 +15,7 @@ use base 'Bugzilla::Object';
use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
use constant AUDIT_REMOVES => 0;
+use constant USE_MEMCACHED => 0;
use Bugzilla;
use Bugzilla::Error;
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index c92d17d8b..b495c9ecd 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -273,6 +273,7 @@ sub _adjust_request_count {
undef,
$requestee_id
);
+ Bugzilla->memcached->clear({ table => 'profiles', id => $requestee_id });
}
sub _new_reviewers_from_input {
diff --git a/extensions/Review/lib/Util.pm b/extensions/Review/lib/Util.pm
index 7304f9ba6..83589e2d0 100644
--- a/extensions/Review/lib/Util.pm
+++ b/extensions/Review/lib/Util.pm
@@ -58,6 +58,7 @@ sub _update_profile {
$data->{needinfo} || 0,
$data->{id}
);
+ Bugzilla->memcached->clear({ table => 'profiles', id => $data->{id} });
}
1;
diff --git a/extensions/TagNewUsers/Extension.pm b/extensions/TagNewUsers/Extension.pm
index 599504225..7f12445fb 100644
--- a/extensions/TagNewUsers/Extension.pm
+++ b/extensions/TagNewUsers/Extension.pm
@@ -168,6 +168,7 @@ sub _update_comment_count {
'UPDATE profiles SET comment_count=? WHERE userid=?',
undef, $count, $id
);
+ Bugzilla->memcached->clear({ table => 'profiles', id => $id });
$self->{comment_count} = $count;
}
@@ -179,6 +180,7 @@ sub _first_patch_bug_id {
'UPDATE profiles SET first_patch_bug_id=? WHERE userid=?',
undef, $bug_id, $self->id
);
+ Bugzilla->memcached->clear({ table => 'profiles', id => $self->id });
$self->{first_patch_bug_id} = $bug_id;
}
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 {