diff options
author | Byron Jones <bjones@mozilla.com> | 2012-12-19 16:56:47 +0800 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-12-19 16:56:47 +0800 |
commit | 387608caac85ccf6c0782572420ecbdae4e301bf (patch) | |
tree | a047006cbf485bb714dea61b39731e28a1366fca /Bugzilla/Attachment.pm | |
parent | e068bcc76fe842fbcac8249ed29593f8a17b0c24 (diff) | |
download | bugs-387608caac85ccf6c0782572420ecbdae4e301bf.tar bugs-387608caac85ccf6c0782572420ecbdae4e301bf.tar.gz bugs-387608caac85ccf6c0782572420ecbdae4e301bf.tar.bz2 bugs-387608caac85ccf6c0782572420ecbdae4e301bf.tar.xz bugs-387608caac85ccf6c0782572420ecbdae4e301bf.zip |
Bug 815532: Add caching for Bugzilla::User objects
r=dkl,a=LpSolit
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r-- | Bugzilla/Attachment.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 3dbd4ce6d..3678424c9 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -190,9 +190,8 @@ the user who attached the attachment sub attacher { my $self = shift; - return $self->{attacher} if exists $self->{attacher}; - $self->{attacher} = new Bugzilla::User($self->{submitter_id}); - return $self->{attacher}; + return $self->{attacher} + ||= new Bugzilla::User({ id => $self->{submitter_id}, cache => 1 }); } =over |