aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuji Yaginuma <yuuji.yaginuma@gmail.com>2019-06-04 13:08:09 +0900
committerGitHub <noreply@github.com>2019-06-04 13:08:09 +0900
commit0244a10b7f05105bc4e476c2f28e4febb769307c (patch)
tree6cb8c58a55823d5f72a192f51266484f0a35a851
parentc926ca46280aee795b98206dd0707a96b9423cc5 (diff)
parenta72f19a6c30cbb389f3d5916d205942d2ba965da (diff)
downloadrails-0244a10b7f05105bc4e476c2f28e4febb769307c.tar.gz
rails-0244a10b7f05105bc4e476c2f28e4febb769307c.tar.bz2
rails-0244a10b7f05105bc4e476c2f28e4febb769307c.zip
Merge pull request #36397 from y-yagi/only_clear_cache_when_view_paths_are_specified
Only clear cache when view paths are specified
-rw-r--r--actionview/lib/action_view/cache_expiry.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionview/lib/action_view/cache_expiry.rb b/actionview/lib/action_view/cache_expiry.rb
index 3d8ffeaefb..7cdc2e9982 100644
--- a/actionview/lib/action_view/cache_expiry.rb
+++ b/actionview/lib/action_view/cache_expiry.rb
@@ -22,6 +22,8 @@ module ActionView
def clear_cache_if_necessary
@mutex.synchronize do
watched_dirs = dirs_to_watch
+ return if watched_dirs.empty?
+
if watched_dirs != @watched_dirs
@watched_dirs = watched_dirs
@watcher = @watcher_class.new([], watched_dirs) do