Use Rails built-in caching and bundling
Reported by Matias Korhonen | May 28th, 2009 @ 11:46 PM | in 0.5
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" />
Comments and changes to this ticket
-
Matias Korhonen June 15th, 2009 @ 08:35 PM
- 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 milestone:"0.3 (Beta)" state:open] http://github.com/k33l0r/hhlc/commit/bfed702ef583b55e815297fd3d57a1...
-
Matias Korhonen June 15th, 2009 @ 08:36 PM
- 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.
-
Matias Korhonen June 15th, 2009 @ 08:36 PM
- State changed from new to open
- Milestone set to 0.5
-
Matias Korhonen June 15th, 2009 @ 08:39 PM
(from [0ca7db680fe4321ad9660bd754683116b963a672]) Removed bundle-fu from environment.rb [#130] http://github.com/k33l0r/hhlc/commit/0ca7db680fe4321ad9660bd7546831...
-
Matias Korhonen June 17th, 2009 @ 10:06 PM
- State changed from open to testing
-
Matias Korhonen June 30th, 2009 @ 02:09 PM
- State changed from testing to resolved
The caching seems to be working as intended. Closing this ticket.
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby on Rails web application for the HAAGA-HELIA Linux Club.
People watching this ticket
Referenced by
- 130 Proposal: Use Rails built-in caching and bundling (from [bfed702ef583b55e815297fd3d57a1ad6a75c14f]) Changed...
- 130 Proposal: Use Rails built-in caching and bundling (from [2dcec94b310c7dff51ba4da520542f8d593bf58a]) Removed...
- 130 Use Rails built-in caching and bundling (from [0ca7db680fe4321ad9660bd754683116b963a672]) Removed...
- 130 Use Rails built-in caching and bundling (from [dc22dcd777d378b8d3919f4126171c79cc34bb8d]) Updated...