Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

do purge when purge headers are present, no matter what status

  • Loading branch information...
commit 99aafb1421814c818f5578b14684931a9ea4a874 1 parent 82ed3a8
@svenfuchs authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/rack/cache/tags.rb
View
6 lib/rack/cache/tags.rb
@@ -27,10 +27,8 @@ def initialize(app)
def call(env)
status, headers, body = app.call(env)
- if status == 200
- store(Rack::Request.new(env).url, headers[TAGS_HEADER]) if headers.key?(TAGS_HEADER)
- purge(headers) if headers.key?(PURGE_TAGS_HEADER)
- end
+ store(Rack::Request.new(env).url, headers[TAGS_HEADER]) if status == 200 && headers.key?(TAGS_HEADER)
+ purge(headers) if headers.key?(PURGE_TAGS_HEADER)
[status, headers, body]
end
Please sign in to comment.
Something went wrong with that request. Please try again.