Skip to content

Commit 5e2c7a6

Browse files
Update lib/private/Memcache/KeyValueCache.php
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 7325048 commit 5e2c7a6

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/private/Memcache/KeyValueCache.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@ class KeyValueCache extends Cache implements IMemcacheTTL {
4949
private ?Client $cache = null;
5050

5151
public function getCache(): Client {
52-
if ($this->cache === null) {
53-
$this->cache = Server::get(KeyValueCacheFactory::class)->getInstance();
54-
}
55-
return $this->cache;
52+
return $this->cache ??= Server::get(KeyValueCacheFactory::class)->getInstance();
5653
}
5754

5855
#[\Override]

0 commit comments

Comments
 (0)