Fix fragment caching on Edge
Reported by jesse newland | November 8th, 2007 @ 06:59 PM
The fragment caching tests were failing on Edge because of the eagerness of extract_options!, which was introduced in [323]. Edge-only tests pass, and run only if the controllers respond_to action_cache_path, as described in #34.
I'm pretty sure this will all pass on gem rails, but due to other craziness, I've got a long-running process that depends on 1.2.5.7919 being installed as a gem. Mind checkin' on it for me?
Comments and changes to this ticket
-
jesse newland November 9th, 2007 @ 04:34 AM
Alright, here's a better patch. The last one was clouded by the tequila in my system and the in-laws yammering on about god knows what in the next room at the time of writing. Seriously.
Anywho, this is updated to check for edgeiness in a way that actually works - if [].respond_to?(:extract_options!) - , and also to fix the edge call to set_content_type! to pass in the controller as the first arg and not the action_cache_path.
-
Chris Wanstrath November 12th, 2007 @ 12:16 PM
- → State changed from new to open
-
Chris Wanstrath November 13th, 2007 @ 02:11 PM
First it fails by not having Hash#except or Hash#slice. So I add those in, then it fails with this: http://pastie.caboo.se/117570
Rails 1.2.5
-
Chris Wanstrath November 13th, 2007 @ 02:14 PM
- → State changed from open to hold
-
jesse newland November 13th, 2007 @ 02:51 PM
Thanks for the hint on multi_rails. Here's a patch that refactors the test framework to use that, adds a test_with_125 rake task, and fixes the errors you mentioned.
Next up, if you're game (I'll open another ticket of course), is making cache_fu appropriately return a 304 status code when the client has the latest cached content and is inside the set TTL.
-
Chris Wanstrath November 13th, 2007 @ 02:59 PM
- → State changed from hold to resolved
(from [419]) cache_fu: get fragment caching working, add multi_rails [Jesse Newland] [#152 state:resolved]
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
