public function read(array $keys)
{
if ($this->_config['scope']) {
$keys = $this->_addScopePrefix($this->_config['scope'], $keys);
}
$results = apc_fetch($keys);
if ($this->_config['scope']) {
$results = $this->_removeScopePrefix($this->_config['scope'], $results);
}
return $results;
}
public function testReadWithScope() { $adapter = new Apc(array('scope' => 'primary')); apc_store('primary:key1', 'test1', 60); apc_store('key1', 'test2', 60); $keys = array('key1'); $expected = array('key1' => 'test1'); $result = $adapter->read($keys); $this->assertEqual($expected, $result); }