Skip to content

Commit ce12763

Browse files
authored
Merge pull request #7485 from nextcloud/fix_7001
Also cache invalid DiscoveryService response
2 parents 784d256 + 3b343e2 commit ce12763

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

apps/files_sharing/lib/External/Storage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private function testRemoteUrl($url) {
280280
$returnValue = false;
281281
}
282282

283-
$cache->set($url, $returnValue);
283+
$cache->set($url, $returnValue, 60*60*24);
284284
return $returnValue;
285285
}
286286

lib/private/OCS/DiscoveryService.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,10 @@ public function discover($remote, $service) {
8181
}
8282
} catch (\Exception $e) {
8383
// if we couldn't discover the service or any end-points we return a empty array
84-
return [];
8584
}
8685

8786
// Write into cache
88-
$this->cache->set($remote . '#' . $service, json_encode($discoveredServices));
87+
$this->cache->set($remote . '#' . $service, json_encode($discoveredServices), 60*60*24);
8988
return $discoveredServices;
9089
}
9190

0 commit comments

Comments
 (0)