From: Eric Wong Date: Tue, 1 Sep 2015 20:33:24 +0000 (+0000) Subject: view: purge email address cache after rendering thread X-Git-Tag: v1.0.0~939 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=36a3b8be4c1dbd8d4c94ac1b3b22165054f9fb14;p=public-inbox.git view: purge email address cache after rendering thread We cannot allow memory in the cache to grow at an unbounded rate in between HTTP requests. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 116f36e7..6aa199e6 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';