public function Redis_Tests_Cache_AbstractFlushUnitTestCase::testFlushALotWithEval in Redis 7.2
File
- lib/
Redis/ Tests/ Cache/ AbstractFlushUnitTestCase.php, line 115
Class
Code
public function testFlushALotWithEval() {
global $conf;
$conf['redis_eval_enabled'] = true;
$conf['redis_flush_mode_cache'] = 2;
$backend = $this
->getBackend();
$this
->assertTrue($backend
->canUseEval());
$cids = array();
for ($i = 0; $i < 30; ++$i) {
$cids[] = $cid = 'test' . $i;
$backend
->set($cid, 42, CACHE_PERMANENT);
}
$backend
->clear('*', true);
foreach ($cids as $cid) {
$this
->assertFalse($backend
->get($cid));
}
}