From 36a3b8be4c1dbd8d4c94ac1b3b22165054f9fb14 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Sep 2015 20:33:24 +0000 Subject: 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. --- lib/PublicInbox/View.pm | 1 + 1 file changed, 1 insertion(+) 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'; -- cgit v1.2.3-24-ge0c7