mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Story#108602614 - one more speed optimization
This commit is contained in:
parent
f02ebe5559
commit
34aa3c0741
3 changed files with 8 additions and 2 deletions
|
@ -30,5 +30,11 @@ module Legacy
|
|||
@new_registrar_cache ||= {}
|
||||
@new_registrar_cache[old_id] ||= ::Registrar.select(:id).find_by(legacy_id: old_id)
|
||||
end
|
||||
|
||||
def self.new_api_user_cached old_id
|
||||
@new_api_user_cache ||= {}
|
||||
@new_api_user_cache[old_id] ||= Legacy::Domain.new_registrar_cached(old_id).try(:api_users).try(:first)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue