Skip to content

Commit 4162b12

Browse files
authored
Merge pull request rails#49965 from jhawthorn/eager_load_formatter
Eager load Journey Formatter cache
2 parents 2eace42 + 591c4aa commit 4162b12

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

actionpack/lib/action_dispatch/journey/formatter.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ def clear
104104
@cache = nil
105105
end
106106

107+
def eager_load!
108+
cache
109+
nil
110+
end
111+
107112
private
108113
def extract_parameterized_parts(route, options, recall)
109114
parameterized_parts = recall.merge(options)

actionpack/lib/action_dispatch/routing/route_set.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def initialize(config = DEFAULT_CONFIG)
386386
def eager_load!
387387
router.eager_load!
388388
routes.each(&:eager_load!)
389+
formatter.eager_load!
389390
nil
390391
end
391392

0 commit comments

Comments
 (0)