summaryrefslogtreecommitdiffstats
path: root/lib/private/Cache/CappedMemoryCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Cache/CappedMemoryCache.php')
-rw-r--r--lib/private/Cache/CappedMemoryCache.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Cache/CappedMemoryCache.php b/lib/private/Cache/CappedMemoryCache.php
index c6b45c49c1c..2e180cfb013 100644
--- a/lib/private/Cache/CappedMemoryCache.php
+++ b/lib/private/Cache/CappedMemoryCache.php
@@ -47,7 +47,11 @@ class CappedMemoryCache implements ICache, \ArrayAccess {
}
public function set($key, $value, $ttl = 0) {
- $this->cache[$key] = $value;
+ if (is_null($key)) {
+ $this->cache[] = $value;
+ } else {
+ $this->cache[$key] = $value;
+ }
$this->garbageCollect();
}