Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2021-05-05 15:10:12 +0300
committerGitHub <noreply@github.com>2021-05-05 15:10:12 +0300
commite78c7b7d24f3341c9c8efd7d04dabc8322605d38 (patch)
tree083a5835a7306eadf76421b84e22202aee3cf750 /lib
parent20e53ac398679b7bae6ca62c7365576c13dff2c1 (diff)
parentc103133272f1182eee2f4b00469e56687a86bedb (diff)
Merge pull request #1513 from eszkadev/empty-cache-capabilities
Don't cache empty capabilities
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/CapabilitiesService.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Service/CapabilitiesService.php b/lib/Service/CapabilitiesService.php
index 981b3640..58115795 100644
--- a/lib/Service/CapabilitiesService.php
+++ b/lib/Service/CapabilitiesService.php
@@ -113,6 +113,10 @@ class CapabilitiesService {
}
$this->capabilities = $capabilities;
- $this->cache->set('capabilities', $capabilities, 3600);
+ $ttl = 3600;
+ if (count($capabilities) === 0)
+ $ttl = 60;
+
+ $this->cache->set('capabilities', $capabilities, $ttl);
}
}