mirror of
https://github.com/google/nomulus.git
synced 2025-05-21 19:59:34 +02:00
Cache domains, contacts, and hosts in WHOIS queries
This should prevent having issues with hot key paths on entities that experience a heavy WHOIS volume (e.g. contacts that registrars reuse on many domains). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191506124
This commit is contained in:
parent
cfd83ad4dc
commit
07d38340f3
9 changed files with 184 additions and 34 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
package google.registry.whois;
|
||||
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKeyCached;
|
||||
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import google.registry.model.host.HostResource;
|
||||
|
@ -31,7 +31,7 @@ public class NameserverLookupByHostCommand extends DomainOrHostLookupCommand {
|
|||
@Override
|
||||
protected Optional<WhoisResponse> getResponse(InternetDomainName hostName, DateTime now) {
|
||||
final HostResource hostResource =
|
||||
loadByForeignKey(HostResource.class, hostName.toString(), now);
|
||||
loadByForeignKeyCached(HostResource.class, hostName.toString(), now);
|
||||
return Optional.ofNullable(
|
||||
hostResource == null ? null : new NameserverWhoisResponse(hostResource, now));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue