| Index: net/proxy/proxy_resolver_js_bindings.cc
|
| diff --git a/net/proxy/proxy_resolver_js_bindings.cc b/net/proxy/proxy_resolver_js_bindings.cc
|
| index f3f6c1558938df3ffc90319ab8404b71d5217b68..d8d02ee15a96eea587a902b08e60e9ad59b05bda 100644
|
| --- a/net/proxy/proxy_resolver_js_bindings.cc
|
| +++ b/net/proxy/proxy_resolver_js_bindings.cc
|
| @@ -23,6 +23,10 @@ namespace net {
|
|
|
| namespace {
|
|
|
| +// TTL for the per-request DNS cache. Applies to both successful and failed
|
| +// DNS resolutions.
|
| +const unsigned kCacheEntryTTLSeconds = 5 * 60;
|
| +
|
| // Event parameters for a PAC error message (line number + message).
|
| class ErrorNetlogParams : public NetLog::EventParameters {
|
| public:
|
| @@ -263,7 +267,8 @@ class DefaultJSBindings : public ProxyResolverJSBindings {
|
| // Save the result back to the per-request DNS cache.
|
| if (host_cache) {
|
| host_cache->Set(cache_key, result, *address_list,
|
| - base::TimeTicks::Now());
|
| + base::TimeTicks::Now(),
|
| + base::TimeDelta::FromSeconds(kCacheEntryTTLSeconds));
|
| }
|
|
|
| return result;
|
|
|