summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-12-13 14:51:48 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-12-13 15:50:53 +0100
commit3b343e287fa18683a1070af26d93916f68a9fea2 (patch)
treedcf7b7a1f8cc709c98fc3f8c14957929a567989d /lib
parent2943b54f98c53ded616ae9ab3ebe2c6b8e47f762 (diff)
downloadnextcloud-server-3b343e287fa18683a1070af26d93916f68a9fea2.tar.gz
nextcloud-server-3b343e287fa18683a1070af26d93916f68a9fea2.zip
Also cache invalid DiscoveryService response
* Cache it for a day so we will retry eventually * Cache the status.php response as well so we will try it once a day as well Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/OCS/DiscoveryService.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/private/OCS/DiscoveryService.php b/lib/private/OCS/DiscoveryService.php
index 35230b4cfd3..e547747da25 100644
--- a/lib/private/OCS/DiscoveryService.php
+++ b/lib/private/OCS/DiscoveryService.php
@@ -81,11 +81,10 @@ class DiscoveryService implements IDiscoveryService {
}
} catch (\Exception $e) {
// if we couldn't discover the service or any end-points we return a empty array
- return [];
}
// Write into cache
- $this->cache->set($remote . '#' . $service, json_encode($discoveredServices));
+ $this->cache->set($remote . '#' . $service, json_encode($discoveredServices), 60*60*24);
return $discoveredServices;
}