summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-11-28 09:40:21 +0100
committerByron Jones <bjones@mozilla.com>2012-11-28 09:40:21 +0100
commit1c5e0c47c92128afebef5614407d84cd72c12b35 (patch)
treefb192713a69dd8a61774f2fdb308a200d9a4e403 /extensions/BMO
parent4096dc51aadfa8344ae649c477827721a4c398ab (diff)
downloadbugzilla-1c5e0c47c92128afebef5614407d84cd72c12b35.tar.gz
bugzilla-1c5e0c47c92128afebef5614407d84cd72c12b35.tar.xz
Bug 814411: Add a caching mechanism to Bugzilla::Object to avoid querying the database repeatedly for the same information
Diffstat (limited to 'extensions/BMO')
-rw-r--r--extensions/BMO/Extension.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index a276a110e..037cc6689 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -144,7 +144,8 @@ sub template_before_process {
if ($file =~ /^attachment\/diff-header\./) {
my $attachid = $vars->{attachid} ? $vars->{attachid} : $vars->{newid};
- $vars->{attachment} = Bugzilla::Attachment->new($attachid) if $attachid;
+ $vars->{attachment} = Bugzilla::Attachment->new({ id => $attachid, cache => 1 })
+ if $attachid;
}
}