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