aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-12-14 07:47:13 +0100
committerGitHub <noreply@github.com>2017-12-14 07:47:13 +0100
commitce12763ab7e29d8b41ef1b0594923f7911decea9 (patch)
treec9f6add35e3e5dd22c79a0a6cb635d866223e1c9
parent784d256103d5777db817aded96afcbd3a2362a10 (diff)
parent3b343e287fa18683a1070af26d93916f68a9fea2 (diff)
downloadnextcloud-server-ce12763ab7e29d8b41ef1b0594923f7911decea9.tar.gz
nextcloud-server-ce12763ab7e29d8b41ef1b0594923f7911decea9.zip
Merge pull request #7485 from nextcloud/fix_7001
Also cache invalid DiscoveryService response
-rw-r--r--apps/files_sharing/lib/External/Storage.php2
-rw-r--r--lib/private/OCS/DiscoveryService.php3
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index d07e0556685..bae24e89e64 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -280,7 +280,7 @@ class Storage extends DAV implements ISharedStorage {
$returnValue = false;
}
- $cache->set($url, $returnValue);
+ $cache->set($url, $returnValue, 60*60*24);
return $returnValue;
}
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;
}