mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
Caching for topic/category RSS feeds
Using anonymous_etag() now
This commit is contained in:
@ -51,14 +51,17 @@ class ListController < ApplicationController
|
||||
raise Discourse::InvalidParameters.new('Category RSS of "uncategorized"') if params[:category] == Slug.for(SiteSetting.uncategorized_name) || params[:category] == SiteSetting.uncategorized_name
|
||||
|
||||
@category = Category.where("slug = ?", params[:category]).includes(:featured_users).first
|
||||
|
||||
guardian.ensure_can_see!(@category)
|
||||
@topic_list = TopicQuery.new.list_new_in_category(@category)
|
||||
render 'list', formats: [:rss]
|
||||
|
||||
anonymous_etag(@category) do
|
||||
@topic_list = TopicQuery.new.list_new_in_category(@category)
|
||||
render 'list', formats: [:rss]
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
|
||||
def respond(list)
|
||||
|
||||
list.draft_key = Draft::NEW_TOPIC
|
||||
|
Reference in New Issue
Block a user