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>
This commit is contained in:
parent
2943b54f98
commit
3b343e287f
2 changed files with 2 additions and 3 deletions
2
apps/files_sharing/lib/External/Storage.php
vendored
2
apps/files_sharing/lib/External/Storage.php
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue