From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 360B21FA7B; Thu, 28 Aug 2014 02:47:42 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Eric Wong Subject: [PATCH 1/5] view: Email::Address cache purge is optional Date: Thu, 28 Aug 2014 02:47:32 +0000 Message-Id: <1409194056-4735-1-git-send-email-e@80x24.org> X-Mailer: git-send-email 2.1.0.2.g6fb949a.dirty List-Id: We will reuse the html_footer function in a nested index. --- lib/PublicInbox/View.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 8bc28cd..ab607a0 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -30,7 +30,7 @@ sub msg_html { headers_to_html_header($mime, $full_pfx) . multipart_text_as_html($mime, $full_pfx) . '
' . PRE_WRAP . - html_footer($mime) . $footer . + html_footer($mime, 1) . $footer . ''; } @@ -204,7 +204,7 @@ sub headers_to_html_header { } sub html_footer { - my ($mime) = @_; + my ($mime, $purge) = @_; my %cc; # everyone else my $to; # this is the From address @@ -219,7 +219,7 @@ sub html_footer { $to ||= $dst; } } - Email::Address->purge_cache; + Email::Address->purge_cache if $purge; my $subj = $mime->header('Subject') || ''; $subj = "Re: $subj" unless $subj =~ /\bRe:/; -- EW