This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 66ae05a7396ae7ff9e88dea318b6252a72ffe44a
tree 3e9d409c4cbe2c160391229aaf166787b9edcb26
parent 2cf817b24dd69e9a1e608b0a2b4073ba6850148b
tree 3e9d409c4cbe2c160391229aaf166787b9edcb26
parent 2cf817b24dd69e9a1e608b0a2b4073ba6850148b
mack-more / mack-caching
mack-caching/README
== Page Caching
Using page caching with Mack, is incredibly easy. The first thing you
need to do is turn it on. In the configatron/*.rb file of your chosing
place the following configuration setting:
use_page_caching: true
That will now enable your application to use the page caching system.
A restart of your application is required for this to take effect.
Now that your application is using page caching, provided by the
Cachetastic gem, you need to tell it which controllers/actions you want
to cache.
To cache all the actions in your controller you would do something like
the following:
class UsersController
include Mack::Controller
cache_pages
# ...
# actions omitted
# ...
end
The cache_pages method takes similar inputs to before/after filters. If
you want to be more specific you can use either the :only or :except flags.
cache_pages :only => [:index, :show]
or
cache_pages :except => [:delete, :edit, :update]







