Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Just modify the body rather than create new array in local cache midd…

…leware.
  • Loading branch information...
commit e8eec56847d25aa30e186a708b4a26c3ffda2444 1 parent 834920d
@jnunemaker authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/flipper/middleware/local_cache.rb
View
8 lib/flipper/middleware/local_cache.rb
@@ -12,13 +12,11 @@ def call(env)
original = @flipper.adapter.memoizing?
@flipper.adapter.memoize = true
- status, headers, body = @app.call(env)
-
- body_proxy = Rack::BodyProxy.new(body) {
+ response = @app.call(env)
+ response[2] = Rack::BodyProxy.new(response[2]) {
@flipper.adapter.memoize = original
}
-
- [status, headers, body_proxy]
+ response
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.