diff options
author | Jan Holesovsky <kendy@collabora.com> | 2021-05-05 15:10:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 15:10:12 +0300 |
commit | e78c7b7d24f3341c9c8efd7d04dabc8322605d38 (patch) | |
tree | 083a5835a7306eadf76421b84e22202aee3cf750 | |
parent | 20e53ac398679b7bae6ca62c7365576c13dff2c1 (diff) | |
parent | c103133272f1182eee2f4b00469e56687a86bedb (diff) |
Merge pull request #1513 from eszkadev/empty-cache-capabilities
Don't cache empty capabilities
-rw-r--r-- | lib/Service/CapabilitiesService.php | 6 |
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); } } |