Skip to content

Commit

Permalink
Remove unnecessary duplicate lines
Browse files Browse the repository at this point in the history
In PR rack#3, headers were converted to lowercase, which resulted in
the same action being performed twice. This PR removes those
duplicate actions.
  • Loading branch information
Moncef Belyamani committed Sep 29, 2022
1 parent f09671b commit 5df3b24
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rack/cache/meta_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ def store(request, response, entity_store)
vary = response.vary
entries =
read(key).reject do |env, res|
(vary == (res['vary'] || res['vary'])) &&
(vary == (res['vary'])) &&
requests_match?(vary, env, stored_env)
end

headers = persist_response(response)
headers.delete('age')
headers.delete('age')

entries.unshift [stored_env, headers]
if request.env['rack-cache.use_native_ttl'] && response.fresh?
Expand Down

0 comments on commit 5df3b24

Please sign in to comment.