Merge pull request #10073 from samford/strategy-remove-response-caching
Strategy: Temporarily remove response caching
This commit is contained in:
commit
1eff47766e
@ -82,10 +82,6 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.page_headers(url)
|
def self.page_headers(url)
|
||||||
@headers ||= {}
|
|
||||||
|
|
||||||
return @headers[url] if @headers.key?(url)
|
|
||||||
|
|
||||||
headers = []
|
headers = []
|
||||||
|
|
||||||
[:default, :browser].each do |user_agent|
|
[:default, :browser].each do |user_agent|
|
||||||
@ -113,15 +109,14 @@ module Homebrew
|
|||||||
.to_h.transform_keys(&:downcase)
|
.to_h.transform_keys(&:downcase)
|
||||||
end
|
end
|
||||||
|
|
||||||
return (@headers[url] = headers) if status.success?
|
return headers if status.success?
|
||||||
end
|
end
|
||||||
|
|
||||||
headers
|
headers
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.page_content(url)
|
def self.page_content(url)
|
||||||
@page_content ||= {}
|
URI.parse(url).open.read
|
||||||
@page_content[url] ||= URI.parse(url).open.read
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user