Methods

Class Public methods

new(watcher:)

📝 Source code
# File actionview/lib/action_view/cache_expiry.rb, line 6
      def initialize(watcher:)
        @execution_lock = Concurrent::ReentrantReadWriteLock.new
        @cache_expiry = ViewModificationWatcher.new(watcher: watcher) do
          clear_cache
        end
      end
🔎 See on GitHub

Instance Public methods

complete(_)

📝 Source code
# File actionview/lib/action_view/cache_expiry.rb, line 20
      def complete(_)
        @execution_lock.release_read_lock
      end
🔎 See on GitHub

run()

📝 Source code
# File actionview/lib/action_view/cache_expiry.rb, line 13
      def run
        ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
          @cache_expiry.execute_if_updated
          @execution_lock.acquire_read_lock
        end
      end
🔎 See on GitHub