Skip to content

Commit 699f53c

Browse files
ClearlyClaireGargron
authored andcommitted
Fix RSS caching (but disable localization) (mastodon#12054)
1 parent f8a0c00 commit 699f53c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/controllers/accounts_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class AccountsController < ApplicationController
99
before_action :set_cache_headers
1010
before_action :set_body_classes
1111

12-
skip_around_action :set_locale, if: -> { request.format == :json }
12+
skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format) }
1313
skip_before_action :require_functional!
1414

1515
def show
@@ -38,7 +38,7 @@ def show
3838
end
3939

4040
format.rss do
41-
expires_in 0, public: true
41+
expires_in 1.minute, public: true
4242

4343
@statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE)
4444
@statuses = cache_collection(@statuses, Status)

0 commit comments

Comments
 (0)