aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionmailer/lib/action_mailer.rb1
-rw-r--r--actionmailer/lib/action_mailer/base.rb4
-rw-r--r--actionpack/lib/abstract_controller.rb6
-rw-r--r--actionpack/lib/abstract_controller/caching.rb (renamed from actionpack/lib/action_dispatch/caching.rb)10
-rw-r--r--actionpack/lib/abstract_controller/caching/fragments.rb (renamed from actionpack/lib/action_dispatch/caching/fragments.rb)2
-rw-r--r--actionpack/lib/action_controller.rb10
-rw-r--r--actionpack/lib/action_controller/caching.rb4
7 files changed, 19 insertions, 18 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb
index 26fbb48600..55c017e338 100644
--- a/actionmailer/lib/action_mailer.rb
+++ b/actionmailer/lib/action_mailer.rb
@@ -44,7 +44,6 @@ module ActionMailer
autoload :MailHelper
autoload :Preview
autoload :Previews, 'action_mailer/preview'
- autoload :Caching
autoload :TestCase
autoload :TestHelper
autoload :MessageDelivery
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 25be5c3a7f..129aa1edfe 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -6,8 +6,6 @@ require 'active_support/core_ext/module/anonymous'
require 'action_mailer/log_subscriber'
-require 'action_dispatch/caching'
-
module ActionMailer
# Action Mailer allows you to send email from your application using a mailer model and views.
#
@@ -432,7 +430,7 @@ module ActionMailer
include AbstractController::Translation
include AbstractController::AssetPaths
include AbstractController::Callbacks
- include ActionDispatch::Caching
+ include AbstractController::Caching
include ActionView::Layouts
diff --git a/actionpack/lib/abstract_controller.rb b/actionpack/lib/abstract_controller.rb
index 56c4033387..1e57cbaac4 100644
--- a/actionpack/lib/abstract_controller.rb
+++ b/actionpack/lib/abstract_controller.rb
@@ -6,6 +6,7 @@ module AbstractController
extend ActiveSupport::Autoload
autoload :Base
+ autoload :Caching
autoload :Callbacks
autoload :Collector
autoload :DoubleRenderError, "abstract_controller/rendering"
@@ -15,4 +16,9 @@ module AbstractController
autoload :Translation
autoload :AssetPaths
autoload :UrlFor
+
+ def self.eager_load!
+ super
+ AbstractController::Caching.eager_load!
+ end
end
diff --git a/actionpack/lib/action_dispatch/caching.rb b/actionpack/lib/abstract_controller/caching.rb
index 4e38098541..0dea50889a 100644
--- a/actionpack/lib/action_dispatch/caching.rb
+++ b/actionpack/lib/abstract_controller/caching.rb
@@ -1,10 +1,12 @@
-require 'action_dispatch/caching/fragments'
-
-module ActionDispatch
+module AbstractController
module Caching
extend ActiveSupport::Concern
extend ActiveSupport::Autoload
+ eager_autoload do
+ autoload :Fragments
+ end
+
module ConfigMethods
def cache_store
config.cache_store
@@ -21,7 +23,7 @@ module ActionDispatch
end
include ConfigMethods
- include ActionDispatch::Caching::Fragments
+ include AbstractController::Caching::Fragments
included do
extend ConfigMethods
diff --git a/actionpack/lib/action_dispatch/caching/fragments.rb b/actionpack/lib/abstract_controller/caching/fragments.rb
index dcc490776e..3257a731ed 100644
--- a/actionpack/lib/action_dispatch/caching/fragments.rb
+++ b/actionpack/lib/abstract_controller/caching/fragments.rb
@@ -1,4 +1,4 @@
-module ActionDispatch
+module AbstractController
module Caching
# Fragment caching is used for caching various blocks within
# views without caching the entire action as a whole. This is
diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb
index 40f33a9de0..62f5905205 100644
--- a/actionpack/lib/action_controller.rb
+++ b/actionpack/lib/action_controller.rb
@@ -9,12 +9,15 @@ module ActionController
autoload :API
autoload :Base
- autoload :Caching
autoload :Metal
autoload :Middleware
autoload :Renderer
autoload :FormBuilder
+ eager_autoload do
+ autoload :Caching
+ end
+
autoload_under "metal" do
autoload :ConditionalGet
autoload :Cookies
@@ -47,11 +50,6 @@ module ActionController
autoload :TestCase, 'action_controller/test_case'
autoload :TemplateAssertions, 'action_controller/test_case'
-
- def self.eager_load!
- super
- ActionController::Caching.eager_load!
- end
end
# Common Active Support usage in Action Controller
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index ff3678d952..9df4ab6c7a 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -1,5 +1,3 @@
-require 'action_dispatch/caching'
-
module ActionController
# \Caching is a cheap way of speeding up slow applications by keeping the result of
# calculations, renderings, and database calls around for subsequent requests.
@@ -26,7 +24,7 @@ module ActionController
extend ActiveSupport::Concern
included do
- include ActionDispatch::Caching
+ include AbstractController::Caching
end
def instrument_payload(key)