method

build_watcher

build_watcher()
private

No documentation available.

# File actionview/lib/action_view/cache_expiry.rb, line 37
        def build_watcher
          @mutex.synchronize do
            old_watcher = @watcher

            if @watched_dirs != dirs_to_watch
              @watched_dirs = dirs_to_watch
              new_watcher = @watcher_class.new([], @watched_dirs) do
                reload!
              end
              @watcher = new_watcher

              # We must check the old watcher after initializing the new one to
              # ensure we don't miss any events
              @previous_change ||= old_watcher&.updated?
            end
          end
        end