Flowdock
method

clear_cache_if_necessary

Importance_0
v6.1.3.1 - Show latest stable - 0 notes - Class: CacheExpiry
clear_cache_if_necessary() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/cache_expiry.rb, line 22
    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
            clear_cache
          end
          @watcher.execute
        else
          @watcher.execute_if_updated
        end
      end
    end
Register or log in to add new notes.