summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-08-28 17:00:41 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-28 17:00:41 +1000
commita7ac3339def8d07d825d64f33e8ca69c21dd2743 (patch)
tree0c227656791e7f37e4856f56969d89cba059bf35
parent6ce78cb1a454e8556580eaf6b253e1111f848ac0 (diff)
DNS(): Cache NXDOMAIN
-rw-r--r--inc/functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index afebd5d8..6ce0b29e 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -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;
}