Merge branch 'reference-cache' into 'master'
Only cache markdown when object has been saved and has a proper cache_key. See merge request !2119
This commit is contained in:
commit
e27db8694c
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ module Mentionable
|
|||
else
|
||||
self.class.mentionable_attrs.each do |attr, options|
|
||||
text = send(attr)
|
||||
options[:cache_key] = [self, attr] if options.delete(:cache)
|
||||
options[:cache_key] = [self, attr] if options.delete(:cache) && self.persisted?
|
||||
ext.analyze(text, options)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue