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.

Use Rails built-in caching and bundling

#130

Should we use the Rails built-in bundling and caching instead of Bundle Fu?

The only disadvantage I can see is that Rails doesn't have JS minification.

Rails API Examples ("Caching multiple stylesheets into one"):

  stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is false =>
    <link href="/stylesheets/style1.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/styleB.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/styleX2.css" media="screen" rel="stylesheet" type="text/css" />

  stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is true =>
    <link href="/stylesheets/all.css"  media="screen" rel="stylesheet" type="text/css" />

  stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is false =>
    <link href="/stylesheets/shop.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/cart.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/checkout.css" media="screen" rel="stylesheet" type="text/css" />

  stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is true =>
    <link href="/stylesheets/payment.css"  media="screen" rel="stylesheet" type="text/css" />

Rails API Examples ("Caching multiple javascripts into one")

  stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is false =>
    <link href="/stylesheets/style1.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/styleB.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/styleX2.css" media="screen" rel="stylesheet" type="text/css" />

  stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is true =>
    <link href="/stylesheets/all.css"  media="screen" rel="stylesheet" type="text/css" />

  stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is false =>
    <link href="/stylesheets/shop.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/cart.css"  media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/checkout.css" media="screen" rel="stylesheet" type="text/css" />

  stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is true =>
    <link href="/stylesheets/payment.css"  media="screen" rel="stylesheet" type="text/css" />

Reported by Matias Korhonen · May 28th, 2009 @ 11:46 PM

State: resolved
Milestone: 0.5
Assigned to: Matias Korhonen Matias Korhonen

Activity

  1. Matias Korhonen
    Matias Korhonen
    • State changed from new to open
    • Milestone set to 0.5

    (from [bfed702ef583b55e815297fd3d57a1ad6a75c14f]) Changed to the Rails built-in bundling and caching from bundle-fu [#130 Use Rails built-in caching and bundling milestone:"0.3 (Beta)" state:open] http://github.com/k33l0r/hhlc/commit/bfed702ef583b55e815297fd3d57a1...

    June 15th, 2009 @ 08:35 PM

  2. Matias Korhonen
  3. Matias Korhonen
    Matias Korhonen
    • State changed from open to new
    • Title changed from Proposal: Use Rails built-in caching and bundling to Use Rails built-in caching and bundling
    • Milestone cleared.

    June 15th, 2009 @ 08:36 PM

  4. Matias Korhonen
    Matias Korhonen
    • State changed from new to open
    • Milestone set to 0.5

    June 15th, 2009 @ 08:36 PM

  5. Matias Korhonen
  6. Matias Korhonen
  7. Matias Korhonen
    Matias Korhonen
    • State changed from open to testing

    June 17th, 2009 @ 10:06 PM

  8. Matias Korhonen
    Matias Korhonen
    • State changed from testing to resolved

    The caching seems to be working as intended. Closing this ticket.

    June 30th, 2009 @ 02:09 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.