mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
support pushing to CappedMemoryCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
1ee7e1c0b1
commit
dc4b983639
1 changed files with 5 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue