about summary refs log tree commit diff
path: root/app/controllers/api/v1/instances_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-21 22:32:16 +0200
committerGitHub <noreply@github.com>2019-07-21 22:32:16 +0200
commitc669bb42baa213dde27d831bb34f0ce14cfb29dc (patch)
treeb609b21505c5f890b1200092de96b1bcc38b957e /app/controllers/api/v1/instances_controller.rb
parent59fd622adc18cb094146f7cda1025782d505404e (diff)
Add (back) rails-level JSON caching (#11333)
Diffstat (limited to 'app/controllers/api/v1/instances_controller.rb')
-rw-r--r--app/controllers/api/v1/instances_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/api/v1/instances_controller.rb b/app/controllers/api/v1/instances_controller.rb
index 8c83a1801..b68c78615 100644
--- a/app/controllers/api/v1/instances_controller.rb
+++ b/app/controllers/api/v1/instances_controller.rb
@@ -5,8 +5,7 @@ class Api::V1::InstancesController < Api::BaseController
   skip_before_action :set_cache_headers
 
   def show
-    render_cached_json('api:v1:instances', expires_in: 5.minutes) do
-      ActiveModelSerializers::SerializableResource.new({}, serializer: REST::InstanceSerializer)
-    end
+    expires_in 3.minutes, public: true
+    render_with_cache json: {}, serializer: REST::InstanceSerializer
   end
 end