diff --git a/app/models/artist.rb b/app/models/artist.rb index 228b54946..c457bde3a 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -1,4 +1,5 @@ class Artist < ActiveRecord::Base + extend Memoist class RevertError < Exception ; end before_create :initialize_creator @@ -52,6 +53,10 @@ class Artist < ActiveRecord::Base end end + included do + memoize :domains + end + def url_array urls.map(&:url) end @@ -250,6 +255,8 @@ class Artist < ActiveRecord::Base end def reload(options = nil) + flush_cache + if instance_variable_defined?(:@notes) remove_instance_variable(:@notes) end