diff options
author | Byron Jones <bjones@mozilla.com> | 2012-11-22 22:39:05 +0800 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-11-22 22:39:05 +0800 |
commit | 4c3e00573133dfc53d07805629af19599aaef7df (patch) | |
tree | e9ce090e958fb60edee1656af12fa414ba79efc3 /Bugzilla/Comment.pm | |
parent | da12cec61f8c7e667b00fc5fc39c827d3593f021 (diff) | |
download | bugs-4c3e00573133dfc53d07805629af19599aaef7df.tar bugs-4c3e00573133dfc53d07805629af19599aaef7df.tar.gz bugs-4c3e00573133dfc53d07805629af19599aaef7df.tar.bz2 bugs-4c3e00573133dfc53d07805629af19599aaef7df.tar.xz bugs-4c3e00573133dfc53d07805629af19599aaef7df.zip |
Bug 811280: Adds a caching mechanism to Bugzilla::Object to avoid querying the database repeatedly for the same information
r=dkl,a=LpSolit
Diffstat (limited to 'Bugzilla/Comment.pm')
-rw-r--r-- | Bugzilla/Comment.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm index 7cf924893..2a7633bc2 100644 --- a/Bugzilla/Comment.pm +++ b/Bugzilla/Comment.pm @@ -130,7 +130,8 @@ sub is_about_attachment { sub attachment { my ($self) = @_; return undef if not $self->is_about_attachment; - $self->{attachment} ||= new Bugzilla::Attachment($self->extra_data); + $self->{attachment} ||= + new Bugzilla::Attachment({ id => $self->extra_data, cache => 1 }); return $self->{attachment}; } |