From 7814d1c0ae63428fecc3df79bec3903a6e8857d0 Mon Sep 17 00:00:00 2001 From: st0012 Date: Fri, 19 Apr 2019 22:50:42 +0900 Subject: Make sure api controllers can perform caching as well Currently ActionController::API doesn't include Caching module, so it can't perform caching. And even if users include it later manually, it won't inherit application's default cache store for action_controllers. So the only way to solve this issue is to include Caching module in ActionController::API, too. This closes #35602 --- actionpack/lib/action_controller/api.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/api.rb b/actionpack/lib/action_controller/api.rb index c276ee57c0..02ab3bf570 100644 --- a/actionpack/lib/action_controller/api.rb +++ b/actionpack/lib/action_controller/api.rb @@ -117,6 +117,7 @@ module ActionController ApiRendering, Renderers::All, ConditionalGet, + Caching, BasicImplicitRender, StrongParameters, -- cgit v1.2.3