Add (back) rails-level JSON caching (#11333)

This commit is contained in:
Eugen Rochko authored and GitHub committed 2019-07-21 22:32:16 +02:00
1 parent 59fd622adc
commit c669bb42ba
10 files changed
+64 -50

No files matched your search

+2 -2
View File
@@ -32,14 +32,14 @@ class StatusesController < ApplicationController
format.json do
expires_in 3.minutes, public: @status.distributable? && public_fetch_mode?
render json: @status, content_type: 'application/activity+json', serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter
render_with_cache json: @status, content_type: 'application/activity+json', serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter
end
end
end
def activity
expires_in 3.minutes, public: @status.distributable? && public_fetch_mode?
render json: @status, content_type: 'application/activity+json', serializer: ActivityPub::ActivitySerializer, adapter: ActivityPub::Adapter
render_with_cache json: @status, content_type: 'application/activity+json', serializer: ActivityPub::ActivitySerializer, adapter: ActivityPub::Adapter
end
def embed