forked from treehouse/mastodon
Fix RSS caching (but disable localization) (#12054)
parent
f8a0c00920
commit
699f53c464
|
@ -9,7 +9,7 @@ class AccountsController < ApplicationController
|
||||||
before_action :set_cache_headers
|
before_action :set_cache_headers
|
||||||
before_action :set_body_classes
|
before_action :set_body_classes
|
||||||
|
|
||||||
skip_around_action :set_locale, if: -> { request.format == :json }
|
skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format) }
|
||||||
skip_before_action :require_functional!
|
skip_before_action :require_functional!
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@ -38,7 +38,7 @@ class AccountsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
format.rss do
|
format.rss do
|
||||||
expires_in 0, public: true
|
expires_in 1.minute, public: true
|
||||||
|
|
||||||
@statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE)
|
@statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE)
|
||||||
@statuses = cache_collection(@statuses, Status)
|
@statuses = cache_collection(@statuses, Status)
|
||||||
|
|
Loading…
Reference in New Issue