Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Fix fragment caching on Edge

#152

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 cache_fu: make action caching stuff work with edge rails.

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?

Reported by Jesse Newland · November 8th, 2007 @ 06:59 PM

State: resolved
Milestone: none
Assigned to: Chris Wanstrath Chris Wanstrath

Activity

  1. Jesse Newland
    Jesse Newland

    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.

    November 9th, 2007 @ 04:34 AM

  2. Chris Wanstrath
    Chris Wanstrath
    • State changed from new to open

    November 12th, 2007 @ 12:16 PM

  3. Chris Wanstrath
    Chris Wanstrath

    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

    November 13th, 2007 @ 02:11 PM

  4. Chris Wanstrath
    Chris Wanstrath
    • State changed from open to hold

    November 13th, 2007 @ 02:14 PM

  5. Jesse Newland
    Jesse Newland

    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.

    November 13th, 2007 @ 02:51 PM

  6. Chris Wanstrath
    Chris Wanstrath
    • State changed from hold to resolved

    (from [419]) cache_fu: get fragment caching working, add multi_rails [Jesse Newland] [#152 state:resolved]

    http://plugins.require.errtheblo...

    November 13th, 2007 @ 02:59 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.