summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Comment.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-11-22 15:39:05 +0100
committerByron Jones <bjones@mozilla.com>2012-11-22 15:39:05 +0100
commit4c3e00573133dfc53d07805629af19599aaef7df (patch)
treee9ce090e958fb60edee1656af12fa414ba79efc3 /Bugzilla/Comment.pm
parentda12cec61f8c7e667b00fc5fc39c827d3593f021 (diff)
downloadbugzilla-4c3e00573133dfc53d07805629af19599aaef7df.tar.gz
bugzilla-4c3e00573133dfc53d07805629af19599aaef7df.tar.xz
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.pm3
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};
}