This commit is contained in:
xljiulang 2021-07-15 03:39:01 +08:00
parent b50326e591
commit ddec5b49c6

View File

@ -104,7 +104,8 @@ namespace FastGithub.ReverseProxy
/// <returns></returns> /// <returns></returns>
private IPAddress? Resolve(string domain) private IPAddress? Resolve(string domain)
{ {
return this.memoryCache.GetOrCreate(typeof(GithubHttpClientHanlder), e => var key = $"domain:{domain}";
return this.memoryCache.GetOrCreate(key, e =>
{ {
e.SetAbsoluteExpiration(TimeSpan.FromSeconds(1d)); e.SetAbsoluteExpiration(TimeSpan.FromSeconds(1d));
return this.githubScanResults.FindBestAddress(domain); return this.githubScanResults.FindBestAddress(domain);