From 4c3e00573133dfc53d07805629af19599aaef7df Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 22 Nov 2012 22:39:05 +0800 Subject: Bug 811280: Adds a caching mechanism to Bugzilla::Object to avoid querying the database repeatedly for the same information r=dkl,a=LpSolit --- Bugzilla/Comment.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Comment.pm') 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}; } -- cgit v1.2.3-24-g4f1b