mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Cache tags_text to avoid computing tags each time when logging"
This reverts commit 05060ddba1
.
Tags are per-fiber, so they can't be cached in an instance variable.
This commit is contained in:
parent
86480e71fa
commit
c3913e580c
1 changed files with 5 additions and 10 deletions
|
@ -40,7 +40,6 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def push_tags(*tags)
|
||||
@tags_text = nil
|
||||
tags.flatten!
|
||||
tags.reject!(&:blank?)
|
||||
current_tags.concat tags
|
||||
|
@ -48,12 +47,10 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def pop_tags(size = 1)
|
||||
@tags_text = nil
|
||||
current_tags.pop size
|
||||
end
|
||||
|
||||
def clear_tags!
|
||||
@tags_text = nil
|
||||
current_tags.clear
|
||||
end
|
||||
|
||||
|
@ -64,7 +61,6 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def tags_text
|
||||
@tags_text ||= begin
|
||||
tags = current_tags
|
||||
if tags.one?
|
||||
"[#{tags[0]}] "
|
||||
|
@ -73,7 +69,6 @@ module ActiveSupport
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module LocalTagStorage # :nodoc:
|
||||
attr_accessor :current_tags
|
||||
|
|
Loading…
Reference in a new issue