Story#108602614 - optimize contacts history import

This commit is contained in:
Vladimir Krylov 2016-01-06 15:18:30 +02:00
parent b75b35f554
commit 1fb0259806
6 changed files with 35 additions and 14 deletions

View file

@ -25,5 +25,10 @@ module Legacy
# OK status is default
domain_statuses << DomainStatus::OK if domain_statuses.empty?
end
def self.new_registrar_cached old_id
@new_registrar_cache ||= {}
@new_registrar_cache[old_id] ||= ::Registrar.select(:id).find_by(legacy_id: old_id)
end
end
end