Skip to content

Commit cdf2b96

Browse files
committed
Only attempt to sweep the cache when cache sweeping is enabled
This mirrors code in the railtie that effectively enables cache sweeping only in development unless otherwise configured.
1 parent 74a0705 commit cdf2b96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/propshaft/server.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ def extract_path_and_digest(env)
4747
end
4848

4949
def execute_cache_sweeper_if_updated
50-
@assembly.load_path.cache_sweeper.execute_if_updated
50+
if @assembly.config.sweep_cache
51+
@assembly.load_path.cache_sweeper.execute_if_updated
52+
end
5153
end
5254
end

0 commit comments

Comments
 (0)