mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 13:02:40 +00:00
Making ApcEngine::clear() only clear keys with a matching
prefix. Refs #1911
This commit is contained in:
parent
3dd86ebfd4
commit
ef921fa56f
2 changed files with 17 additions and 1 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue