From c469b433d581bf80fe2272dfd380cd12043aafd0 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 17 Dec 2013 13:47:30 +0800 Subject: Bug 815026: Bugzilla::Object cache should be cleared when an object is updated or removed from the database --- Bugzilla/Object.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index b1bc229bf..4525fa78a 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -477,6 +477,7 @@ sub update { $dbh->bz_commit_transaction(); $self->_cache_remove({ id => $self->id }); + $self->_cache_remove({ name => $self->name }) if $self->name; if (wantarray) { return (\%changes, $old_self); @@ -496,6 +497,7 @@ sub remove_from_db { $dbh->do("DELETE FROM $table WHERE $id_field = ?", undef, $self->id); $dbh->bz_commit_transaction(); $self->_cache_remove({ id => $self->id }); + $self->_cache_remove({ name => $self->name }) if $self->name; undef $self; } -- cgit v1.2.3-24-g4f1b