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 { ...@@ -1058,6 +1058,7 @@ sub create {
$field->_update_visibility_values(); $field->_update_visibility_values();
$dbh->bz_commit_transaction(); $dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
if ($field->custom) { if ($field->custom) {
my $name = $field->name; my $name = $field->name;
...@@ -1096,6 +1097,7 @@ sub update { ...@@ -1096,6 +1097,7 @@ sub update {
$dbh->do("UPDATE " . $self->name . " SET visibility_value_id = NULL"); $dbh->do("UPDATE " . $self->name . " SET visibility_value_id = NULL");
} }
$self->_update_visibility_values(); $self->_update_visibility_values();
Bugzilla->memcached->clear_config();
return $changes; return $changes;
} }
......
...@@ -216,6 +216,7 @@ sub update { ...@@ -216,6 +216,7 @@ sub update {
Bugzilla::Hook::process('group_end_of_update', Bugzilla::Hook::process('group_end_of_update',
{ group => $self, changes => $changes }); { group => $self, changes => $changes });
$dbh->bz_commit_transaction(); $dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
return $changes; return $changes;
} }
......
...@@ -113,10 +113,10 @@ sub update { ...@@ -113,10 +113,10 @@ sub update {
$dbh->do('UPDATE products SET defaultmilestone = ? $dbh->do('UPDATE products SET defaultmilestone = ?
WHERE id = ? AND defaultmilestone = ?', WHERE id = ? AND defaultmilestone = ?',
undef, ($self->name, $self->product_id, $changes->{value}->[0])); undef, ($self->name, $self->product_id, $changes->{value}->[0]));
Bugzilla->memcached->clear({ table => 'produles', id => $self->product_id }); Bugzilla->memcached->clear({ table => 'products', id => $self->product_id });
Bugzilla->memcached->clear_config();
} }
$dbh->bz_commit_transaction(); $dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
return $changes; return $changes;
} }
......
...@@ -102,6 +102,7 @@ sub create { ...@@ -102,6 +102,7 @@ sub create {
Bugzilla::Hook::process('product_end_of_create', { product => $product }); Bugzilla::Hook::process('product_end_of_create', { product => $product });
$dbh->bz_commit_transaction(); $dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
return $product; return $product;
} }
...@@ -258,6 +259,7 @@ sub update { ...@@ -258,6 +259,7 @@ sub update {
# Changes have been committed. # Changes have been committed.
delete $self->{check_group_controls}; delete $self->{check_group_controls};
Bugzilla->user->clear_product_cache(); Bugzilla->user->clear_product_cache();
Bugzilla->memcached->clear_config();
return $changes; return $changes;
} }
...@@ -316,6 +318,7 @@ sub remove_from_db { ...@@ -316,6 +318,7 @@ sub remove_from_db {
$self->SUPER::remove_from_db(); $self->SUPER::remove_from_db();
$dbh->bz_commit_transaction(); $dbh->bz_commit_transaction();
Bugzilla->memcached->clear_config();
# We have to delete these internal variables, else we get # We have to delete these internal variables, else we get
# the old lists of products and classifications again. # 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