jroes / spree_page_cache

Minor tweaks to make Spree pages suitable for page caching

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpreePageCache

This gem makes it safe to fully cache pages in spree application.

It doesn't specifiy what pages / actions to cache as that's application specific, but it does include coarse sweepers for products and taxon.

You generally need to include the following overrides into your application:

Spree::HomeController.class_eval do
  caches_page :index
end

Spree::ProductsController.class_eval do
  caches_page :index, :show
end

Spree::TaxonsController.class_eval do
  caches_page :index, :show
end

Setup

Add this to your gem file Gemfile

gem "spree_page_cache"

rake spree_page_cache:install

Copyright (c) 2011 Neeraj Singh, released under the New BSD License

About

Minor tweaks to make Spree pages suitable for page caching


Languages

Language:Ruby 65.6%Language:JavaScript 34.4%