From 86f138ed169e41142862e86c3e3d48a0d48f9c0e Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Mon, 24 Sep 2018 23:15:49 +0900 Subject: Cache instance info (#8765) --- app/controllers/api/v1/instances_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/controllers/api') diff --git a/app/controllers/api/v1/instances_controller.rb b/app/controllers/api/v1/instances_controller.rb index 1c6971c18..5686e8d7c 100644 --- a/app/controllers/api/v1/instances_controller.rb +++ b/app/controllers/api/v1/instances_controller.rb @@ -4,6 +4,8 @@ class Api::V1::InstancesController < Api::BaseController respond_to :json def show - render json: {}, serializer: REST::InstanceSerializer + render_cached_json('api:v1:instances', expires_in: 5.minutes) do + ActiveModelSerializers::SerializableResource.new({}, serializer: REST::InstanceSerializer) + end end end -- cgit