From 09ff147a1c3acf3fa16be5a9dce8b8658dbd5819 Mon Sep 17 00:00:00 2001 From: Dylan Hardison Date: Fri, 26 Feb 2016 08:56:16 -0500 Subject: Bug 1251221 - Pass cache => 1 to calls to Bugzilla::Product->new() called in Bugzilla::{Milestone,Version,Component} r=dkl,a=dylan --- Bugzilla/Component.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Component.pm') diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index 0fe6fb25a..74c3ae99a 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -405,10 +405,9 @@ sub initial_cc { sub product { my $self = shift; - if (!defined $self->{'product'}) { - require Bugzilla::Product; # We cannot |use| it. - $self->{'product'} = new Bugzilla::Product($self->product_id); - } + + require Bugzilla::Product; + $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 }); return $self->{'product'}; } -- cgit v1.2.3-24-g4f1b