Making ApcEngine::clear() only clear keys with a matching

prefix. Refs #1911
This commit is contained in:
Mark Story 2011-08-19 23:13:52 -04:00
parent 3dd86ebfd4
commit ef921fa56f
2 changed files with 17 additions and 1 deletions

View file

@ -197,10 +197,13 @@ class ApcEngineTest extends CakeTestCase {
* @return void
*/
public function testClear() {
apc_store('not_cake', 'survive');
Cache::write('some_value', 'value', 'apc');
$result = Cache::clear(false, 'apc');
$this->assertTrue($result);
$this->assertFalse(Cache::read('some_value', 'apc'));
$this->assertEquals('survive', apc_fetch('not_cake'));
apc_delete('not_cake');
}
}