support pushing to CappedMemoryCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
1ee7e1c0b1
commit
dc4b983639
|
@ -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 New Issue