From dc4b98363956b1617749ff0abced8f68a6a5da49 Mon Sep 17 00:00:00 2001
From: Robin Appelman <robin@icewind.nl>
Date: Wed, 29 Mar 2017 19:16:12 +0200
Subject: [PATCH] support pushing to CappedMemoryCache

Signed-off-by: Robin Appelman <robin@icewind.nl>
---
 lib/private/Cache/CappedMemoryCache.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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();
 	}
 
-- 
GitLab