Source: show | on GitHub
# 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
# File actionview/lib/action_view/cache_expiry.rb, line 20 def complete(_) @execution_lock.release_read_lock end
# 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