Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rtomayko/rack-cache
base: master
head fork: wildfalcon/rack-cache
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 2 commit comments
  • 1 contributor
1  lib/rack/cache.rb
@@ -26,6 +26,7 @@
# set :entitystore, 'file:/var/cache/rack'
# end
# run app
module Rack::Cache
autoload :Request, 'rack/cache/request'
autoload :Response, 'rack/cache/response'
4 lib/rack/cache/context.rb
@@ -253,6 +253,10 @@ def fetch
# Write the response to the cache.
def store(response)
+ if cache_set_cookie? && cache_set_cookie == false
+ response.headers["Set-Cookie"]=nil
+ end
+, response, entitystore)
response.headers['Age'] = response.age.to_s
rescue Exception => e
4 lib/rack/cache/options.rb
@@ -95,6 +95,10 @@ def option_name(key)
# default for compliance with RFC 2616.
option_accessor :allow_revalidate
+ # Sepecified whether the cache should cache Set-Cookie headers when
+ # Caching a response from the backend server
+ option_accessor :cache_set_cookie
# The underlying options Hash. During initialization (or outside of a
# request), this is a default values Hash. During a request, this is the
# Rack environment Hash. The default values Hash is merged in underneath

Showing you all comments on commits in this comparison.




do you hate lowercase? :p

Something went wrong with that request. Please try again.