Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache rss feeds #142

Open
joeljunstrom opened this issue Dec 17, 2012 · 0 comments
Open

Cache rss feeds #142

joeljunstrom opened this issue Dec 17, 2012 · 0 comments

Comments

@joeljunstrom
Copy link

Something like:

before_filter :find_page_template,
                       only: [ :index, :search, :categories, :category, :tagged_with]
caches_action :index,
                           cache_path: Proc.new { [ find_page_template.cache_key, 'rss' ].join('/') },
                           if: proc { request.format.rss? }

def find_page_template
  @page_template ||= PageTemplate.first handle: node.handle
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant