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=-3.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 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 B20341FABC for ; Tue, 1 Sep 2015 20:33:24 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] view: purge email address cache after rendering thread Date: Tue, 1 Sep 2015 20:33:24 +0000 Message-Id: <1441139604-4163-3-git-send-email-e@80x24.org> List-Id: We cannot allow memory in the cache to grow at an unbounded rate in between HTTP requests. --- lib/PublicInbox/View.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 116f36e..6aa199e 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -157,6 +157,7 @@ sub emit_thread_html { my $git = PublicInbox::GitCatFile->new($ctx->{git_dir}); thread_entry($fh, $git, $state, $_, 0) for $th->rootset; } + Email::Address->purge_cache; my $final_anchor = $state->{anchor_idx}; my $next = ""; $next .= $final_anchor == 1 ? 'only message in' : 'end of'; -- EW