This project is archived and is in readonly mode.
Adding public options to client-side caching
-
Repository
- State changed from new to committed
(from [f2a32bd0dedf11021027e36cc2c99f97434cae17]) Added ability to pass in :public => true to fresh_when, stale?, and expires_in to make the request proxy cachable [#2095 Adding public options to client-side caching state:committed]
Signed-off-by: David Heinemeier Hansson david@loudthinking.com http://github.com/rails/rails/co...
-
Johan Sørensen
- Assigned user set to DHH
Actually, the default Cache-Control seems to be no-cache now, when you use the conditional GET helpers at least. So this patch only helps if you only want public headers.
I'm thinking this patch should be reworked so that you can say :public => false. Which would make it set a Cache-Control header of private, instead of the no-cache default. This is useful if you want the clients to cache it, but not any proxies (assuming they play nice of course).
-
Johan Sørensen
Due to the fact that this commit introduces two test methods named test_expires_in_header this is never exposed in the tests.
Attached is a patch that renames one of the test methods and fixes the regression.
-
Pratik
- State changed from committed to open
-
Repository
- State changed from open to resolved
(from [c071123b3e2d6fd918dd7e419efe7429355445c2]) Ensure expires_in without a :public key sets the Cache-Control header to private. [#2095 Adding public options to client-side caching state:resolved]
This fixes a regression introduced in f2a32bd0, which wasn't exposed due to two test methods having the same name.
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
