Commit 82436047 authored by Byron Jones's avatar Byron Jones

Bug 1002357: memached->clear_config isn't always called where required

r=dkl, a=glob
parent ffaf79a2
......@@ -1058,6 +1058,7 @@ sub create {
$field->_update_visibility_values();
$dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
if ($field->custom) {
my $name = $field->name;
......@@ -1096,6 +1097,7 @@ sub update {
$dbh->do("UPDATE " . $self->name . " SET visibility_value_id = NULL");
}
$self->_update_visibility_values();
Bugzilla->memcached->clear_config();
return $changes;
}
......
......@@ -216,6 +216,7 @@ sub update {
Bugzilla::Hook::process('group_end_of_update',
{ group => $self, changes => $changes });
$dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
return $changes;
}
......
......@@ -113,10 +113,10 @@ sub update {
$dbh->do('UPDATE products SET defaultmilestone = ?
WHERE id = ? AND defaultmilestone = ?',
undef, ($self->name, $self->product_id, $changes->{value}->[0]));
Bugzilla->memcached->clear({ table => 'produles', id => $self->product_id });
Bugzilla->memcached->clear_config();
Bugzilla->memcached->clear({ table => 'products', id => $self->product_id });
}
$dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
return $changes;
}
......
......@@ -102,6 +102,7 @@ sub create {
Bugzilla::Hook::process('product_end_of_create', { product => $product });
$dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
return $product;
}
......@@ -258,6 +259,7 @@ sub update {
# Changes have been committed.
delete $self->{check_group_controls};
Bugzilla->user->clear_product_cache();
Bugzilla->memcached->clear_config();
return $changes;
}
......@@ -316,6 +318,7 @@ sub remove_from_db {
$self->SUPER::remove_from_db();
$dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
# We have to delete these internal variables, else we get
# the old lists of products and classifications again.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment