Skip to content

Commit 689e756

Browse files
authored
Server should also sweep cache (#232)
1 parent 6a84a8c commit 689e756

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/propshaft/server.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def initialize(assembly)
77
end
88

99
def call(env)
10+
execute_cache_sweeper_if_updated
1011
path, digest = extract_path_and_digest(env)
1112

1213
if (asset = @assembly.load_path.find(path)) && asset.fresh?(digest)
@@ -44,4 +45,8 @@ def extract_path_and_digest(env)
4445
else
4546
VARY = "vary"
4647
end
48+
49+
def execute_cache_sweeper_if_updated
50+
Rails.application.assets.load_path.cache_sweeper.execute_if_updated
51+
end
4752
end

0 commit comments

Comments
 (0)