From f898eac5f4c62e0f2e279fc5c27c7c4892523f89 Mon Sep 17 00:00:00 2001 From: trizen Date: Wed, 26 Feb 2020 11:37:02 +0200 Subject: - Fixed the "Author -> Uploads" entry. - Set the default cache directory in /tmp --- lib/WWW/StrawViewer.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/WWW/StrawViewer.pm') diff --git a/lib/WWW/StrawViewer.pm b/lib/WWW/StrawViewer.pm index 097d218..38fa317 100644 --- a/lib/WWW/StrawViewer.pm +++ b/lib/WWW/StrawViewer.pm @@ -284,8 +284,7 @@ sub set_lwp_useragent { my ($response) = @_; my $code = $response->code; - $code >= 500 # do not cache any bad response - or $code == 401 # don't cache an unauthorized response + $code >= 400 # do not cache any bad response or $response->request->method ne 'GET' # cache only GET requests # don't cache if "cache-control" specifies "max-age=0" or "no-store" -- cgit v1.2.3