diff --git a/lib/propshaft/server.rb b/lib/propshaft/server.rb index 5bcf169a..81ffedaf 100644 --- a/lib/propshaft/server.rb +++ b/lib/propshaft/server.rb @@ -7,6 +7,7 @@ def initialize(assembly) end def call(env) + execute_cache_sweeper_if_updated path, digest = extract_path_and_digest(env) if (asset = @assembly.load_path.find(path)) && asset.fresh?(digest) @@ -44,4 +45,8 @@ def extract_path_and_digest(env) else VARY = "vary" end + + def execute_cache_sweeper_if_updated + Rails.application.assets.load_path.cache_sweeper.execute_if_updated + end end