Skip to content
Snippets Groups Projects
Commit c0200bc5 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Use "hasKey" instead of checking the value

If the check is negative it would depending on the used cache store the value as an empty string. When reading the value this check would thus return "false" even if a value exists.
parent 8c8ff0ea
No related branches found
No related tags found
No related merge requests found
......@@ -253,8 +253,8 @@ class Storage extends DAV implements ISharedStorage {
*/
private function testRemoteUrl($url) {
$cache = $this->memcacheFactory->create('files_sharing_remote_url');
if($result = $cache->get($url)) {
return (bool)$result;
if($cache->hasKey($url)) {
return (bool)$cache->get($url);
}
$result = file_get_contents($url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment