PHP cache library, with adapters for e.g. Memcached, Redis, Couchbase, APC(u), SQL and additional capabilities (e.g. transactions, stampede protection) built on top.
I'm using Redis adapter with SimpleCache implementation and I guess there is a bug here.
$testStore = new SimpleCache(new Redis($client)); var_dump($testStore->get('missedKey'));
For the key missed I'm expecting the $default value defined by this method.
`
public function get($key, $default = null)
{
$this->assertValidKey($key);
// KeyValueStore::get returns false for cache misses (which could also
// be confused for a `false` value), so we'll check existence with getMulti
$multi = $this->store->getMulti(array($key));
return isset($multi[$key]) ? $multi[$key] : $default;
}
`
The result for the key missed is instead the boolean "false" when the default is "null".
I'm using Redis adapter with SimpleCache implementation and I guess there is a bug here.
$testStore = new SimpleCache(new Redis($client)); var_dump($testStore->get('missedKey'));
For the key missed I'm expecting the $default value defined by this method.
` public function get($key, $default = null) { $this->assertValidKey($key);
`
The result for the key missed is instead the boolean "false" when the default is "null".