class ActionView::CacheExpiry::Executor
def clear_cache
def clear_cache @execution_lock.with_write_lock do ActionView::LookupContext::DetailsKey.clear end end
def complete(_)
def complete(_) @execution_lock.release_read_lock end
def initialize(watcher:)
def initialize(watcher:) @execution_lock = Concurrent::ReentrantReadWriteLock.new @cache_expiry = ViewModificationWatcher.new(watcher: watcher) do clear_cache end end
def run
def run ActiveSupport::Dependencies.interlock.permit_concurrent_loads do @cache_expiry.execute_if_updated @execution_lock.acquire_read_lock end end