@@ 36,11 36,9 @@ shouldCacheHTTP :: Response b -> Bool
-- IETF RFC7234 Section 3
shouldCacheHTTP response = -- Assume GET
statusCode (responseStatus response) `Prelude.elem` [200, 201, 404] && -- Supported response code
- isNothing (httpCacheDirective response "no-store") && -- Honor no-store
- True && -- This is a private cache, don't check for Cache-Control: private
- (isJust (lookup hExpires $ responseHeaders response) || -- Support Expires: header
- isJust (httpCacheDirective response "max-age") ||
- isJust (httpCacheDirective response "public")) -- Override directive
+ isNothing (httpCacheDirective response "no-store") -- Honor no-store
+ -- This is a private cache, don't check for Cache-Control: private
+ -- Also, I'll cache anything for supported response codes, regardless of explicit expiry times.
uriToString' uri = uriToString id uri ""
parseHTTPTime str | ',' `L.elem` str = parseTimeM True defaultTimeLocale rfc822DateFormat str