support pushing to CappedMemoryCache

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/4150/head
Robin Appelman 9 years ago
parent 1ee7e1c0b1
commit dc4b983639
No known key found for this signature in database
GPG Key ID: 50F2B59C6DEBBCFE
  1. 6
      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();
}

Loading…
Cancel
Save