Cache featured collections, as well as outbox, followers and following (#10467)
This commit is contained in:
parent
d4882aa64a
commit
cc6e3c3900
4 changed files with 33 additions and 5 deletions
|
@ -3,6 +3,8 @@
|
|||
class FollowerAccountsController < ApplicationController
|
||||
include AccountControllerConcern
|
||||
|
||||
before_action :set_cache_headers
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
|
@ -17,6 +19,11 @@ class FollowerAccountsController < ApplicationController
|
|||
format.json do
|
||||
raise Mastodon::NotPermittedError if params[:page].present? && @account.user_hides_network?
|
||||
|
||||
if params[:page].blank?
|
||||
skip_session!
|
||||
expires_in 3.minutes, public: true
|
||||
end
|
||||
|
||||
render json: collection_presenter,
|
||||
serializer: ActivityPub::CollectionSerializer,
|
||||
adapter: ActivityPub::Adapter,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue