Integrates Rails fragment caching with Fortitude.
include Fortitude::Caching
in your base widget class.- Call
cacheable
for widgets that you want cached.
By using fortitude-caching
, this:
class Views::Pages::Show < Views::Base
needs :page
cacheable
def content
...
end
end
Is the equivalent of this:
class Views::Pages::Show < Views::Base
needs :page
def content
cache(page) do
...
end
end
end
MIT