Skip to content

Commit f06ee2a

Browse files
authored
Merge pull request rails#27926 from st0012/freeze-cache-instrument-name
Freeze fragment cache related instrument name.
2 parents 2809f38 + dde7134 commit f06ee2a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

actionmailer/lib/action_mailer/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ def instrument_payload(key)
972972
end
973973

974974
def instrument_name
975-
"action_mailer"
975+
"action_mailer".freeze
976976
end
977977

978978
ActiveSupport.run_load_hooks(:action_mailer, self)

actionpack/lib/abstract_controller/caching/fragments.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def expire_fragment(key, options = nil)
136136

137137
def instrument_fragment_cache(name, key) # :nodoc:
138138
payload = instrument_payload(key)
139-
ActiveSupport::Notifications.instrument("#{name}.#{instrument_name}", payload) { yield }
139+
ActiveSupport::Notifications.instrument("#{name}.#{instrument_name}".freeze, payload) { yield }
140140
end
141141
end
142142
end

actionpack/lib/action_controller/caching.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def instrument_payload(key)
3838
end
3939

4040
def instrument_name
41-
"action_controller"
41+
"action_controller".freeze
4242
end
4343
end
4444
end

0 commit comments

Comments
 (0)