about summary refs log tree commit diff
path: root/app/controllers/activitypub
diff options
context:
space:
mode:
authorHolly "Frinkeldoodle" Lotor <admin@frinkel.tech>2020-01-17 07:07:03 +0000
committerHolly "Frinkeldoodle" Lotor <admin@frinkel.tech>2020-01-17 07:32:59 +0000
commit93151f0c51a0418cd51e270a0834c92a771910ab (patch)
tree800f7af97950280ed591129e3df6aee5641e2ba5 /app/controllers/activitypub
parent753d06495189dd6ffd95ea91028cc2a03866e974 (diff)
Port render_with_cache, CacheConcern from upstream
Diffstat (limited to 'app/controllers/activitypub')
-rw-r--r--app/controllers/activitypub/collections_controller.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/controllers/activitypub/collections_controller.rb b/app/controllers/activitypub/collections_controller.rb
index e2274ee1a..cd23506f3 100644
--- a/app/controllers/activitypub/collections_controller.rb
+++ b/app/controllers/activitypub/collections_controller.rb
@@ -9,14 +9,8 @@ class ActivityPub::CollectionsController < Api::BaseController
   before_action :set_cache_headers
 
   def show
-    render_cached_json(['activitypub', 'collection', @account, params[:id]], content_type: 'application/activity+json') do
-      ActiveModelSerializers::SerializableResource.new(
-        collection_presenter,
-        serializer: ActivityPub::CollectionSerializer,
-        adapter: ActivityPub::Adapter,
-        skip_activities: true
-      )
-    end
+    expires_in 3.minutes
+    render_with_cache json: collection_presenter, content_type: 'application/activity+json', serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter, skip_activities: true
   end
 
   private