diff options
author | Byron Jones <bjones@mozilla.com> | 2013-12-17 06:47:30 +0100 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-12-17 06:47:30 +0100 |
commit | c469b433d581bf80fe2272dfd380cd12043aafd0 (patch) | |
tree | 4f86a06fdbbaf44e96e5bc4ec1ed76568558f522 | |
parent | 210e17650e672e6023f1cafaf5536cd75e2254d4 (diff) | |
download | bugzilla-c469b433d581bf80fe2272dfd380cd12043aafd0.tar.gz bugzilla-c469b433d581bf80fe2272dfd380cd12043aafd0.tar.xz |
Bug 815026: Bugzilla::Object cache should be cleared when an object is updated or removed from the database
-rw-r--r-- | Bugzilla/Object.pm | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |