I have a strange problem with Rack-Cache and redirects that I can only
reproduce some of the time. Let me start by showing you what I found
cached in the "meta" when I was able to reproduce this problem
locally...
[[{"SERVER_NAME"=>"127.0.0.1",
"HTTP_ACCEPT"=>"text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8",
"HTTP_HOST"=>"127.0.0.1",
"HTTP_X_FORWARDED_HOST"=>"127.0.0.1",
"HTTP_USER_AGENT"=>"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6;
en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5",
"REQUEST_PATH"=>"/signup/form/0",
"SERVER_PROTOCOL"=>"HTTP/1.1",
"HTTP_ACCEPT_LANGUAGE"=>"en-us,en;q=0.5",
"REMOTE_ADDR"=>"127.0.0.1",
"PATH_INFO"=>"/signup/form/0",
"SERVER_SOFTWARE"=>"Mongrel 1.1.5",
"SCRIPT_NAME"=>"",
"HTTP_VERSION"=>"HTTP/1.1",
"HTTP_X_FORWARDED_SERVER"=>"127.0.0.1",
"HTTP_X_FORWARDED_PROTO"=>"https",
"REQUEST_URI"=>"/signup/form/0",
"SERVER_PORT"=>"80",
"HTTP_X_FORWARDED_FOR"=>"127.0.0.1",
"HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.7",
"REQUEST_METHOD"=>"GET",
"QUERY_STRING"=>"",
"GATEWAY_INTERFACE"=>"CGI/1.2",
"HTTP_CONNECTION"=>"Keep-Alive",
"HTTP_ACCEPT_ENCODING"=>"gzip,deflate"}, {"Location"=>"http://
127.0.0.1/signup/form/0",
"X-Content-Digest"=>"531b3a921cf45cc6ed54e6da8f19b0c12dd4900e",
"Date"=>"Wed, 18 Nov 2009 18:38:28 GMT",
"Content-Type"=>"text/html; charset=utf-8",
"X-Runtime"=>"11",
"Content-Length"=>"96",
"Set-Cookie"=>"",
"Cache-Control"=>"no-cache, s-maxage=31536000",
"X-Status"=>"302"}]]
Notice that in the cached headers the "Cache-Control" is set to "no-
cache, s-maxage=31536000." It's my understanding that if a response
contains the "no-cache" directive that the response should not be
cached under any circumstances. So, why was this response cached?
There's a lot more to my story, but, I figured I'd start here because
it seems to me that this page should have never been cached in the
first place and I cannot get it to cache this page most of the time.
Thanks in advance,
Jason