mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-20 04:31:23 +01:00
DNS(): Cache NXDOMAIN
This commit is contained in:
parent
f09c31e3f2
commit
dab10e4889
@ -1940,7 +1940,7 @@ function DNS($host) {
|
||||
global $config;
|
||||
|
||||
if ($config['cache']['enabled'] && ($ip_addr = cache::get('dns_' . $host))) {
|
||||
return $ip_addr;
|
||||
return $ip_addr != '?' ? $ip_addr : false;
|
||||
}
|
||||
|
||||
if (!$config['dns_system']) {
|
||||
@ -1956,7 +1956,7 @@ function DNS($host) {
|
||||
}
|
||||
|
||||
if ($config['cache']['enabled'])
|
||||
cache::set('dns_' . $host, $ip_addr, 3600);
|
||||
cache::set('dns_' . $host, $ip_addr !== false ? $ip_addr : '?', 3600);
|
||||
|
||||
return $ip_addr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user