fortitude-caching

Integrates Rails fragment caching with Fortitude.

Usage

  1. include Fortitude::Caching in your base widget class.
  2. 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

License

MIT