tests/PdoTest.php
/**
     * With multiple caches in play, calling flush(true) should remove all of
     * the entries from the database regardless of which cache instance they
     * are associated with.
     */
With multiple caches in play, calling flush(true) should remove all of
the entries from the database regardless of which cache instance they
are associated with.
With multiple caches in play calling flush ( true ) should remove all of the entries from the database regardless of which cache instance they are associated with .
public function testFlushAll_secondCache()
    {
        $options = array(
            'prefix_key'        => 'second-cache-key:', 
            'prefix_tag'        => 'second-cache-tag:', 
            'tag_enable'        => true               
        );
        $localCache = new $this->classname($this->pdo, $options);
        $this->assertTrue(
            $this->cache->save('data1_1', 'id1_1', array('tag1_1', 'tag1_2')) &&
            $this->cache->save('data1_2', 'id1_2', array('tag1_2', 'tag1_3')) &&
            $this->cache->save('data1_3', 'id1_3', array('tag1_3', 'tag1_4'))
            );
        $this->assertTrue(
            $localCache->save('data2_1', 'id2_1', array('tag2_1', 'tag2_2')) &&
            $localCache->save('data2_2', 'id2_2', array('tag2_2', 'tag2_3')) &&
            $localCache->save('data2_3', 'id2_3', array('tag2_3', 'tag2_4'))
            );
        $this->assertTrue($this->cache->flush(true));
        $this->assertNull($this->cache->load('id1_3'));
        $this->assertNull($this->cache->load('tag1_1', 'tag'));
        $this->assertNull($localCache->load('id2_3'));
        $this->assertNull($localCache->load('tag2_1', 'tag'));
        unset($localCache);
    }
public function testFlushAll_secondCache ( ) { $ options = array ( 'prefix_key' => 'second-cache-key:' , 'prefix_tag' => 'second-cache-tag:' , 'tag_enable' => true ) ; $ localCache = new $ this -> classname ( $ this -> pdo , $ options ) ; $ this -> assertTrue ( $ this -> cache -> save ( 'data1_1' , 'id1_1' , array ( 'tag1_1' , 'tag1_2' ) ) && $ this -> cache -> save ( 'data1_2' , 'id1_2' , array ( 'tag1_2' , 'tag1_3' ) ) && $ this -> cache -> save ( 'data1_3' , 'id1_3' , array ( 'tag1_3' , 'tag1_4' ) ) ) ; $ this -> assertTrue ( $ localCache -> save ( 'data2_1' , 'id2_1' , array ( 'tag2_1' , 'tag2_2' ) ) && $ localCache -> save ( 'data2_2' , 'id2_2' , array ( 'tag2_2' , 'tag2_3' ) ) && $ localCache -> save ( 'data2_3' , 'id2_3' , array ( 'tag2_3' , 'tag2_4' ) ) ) ; $ this -> assertTrue ( $ this -> cache -> flush ( true ) ) ; $ this -> assertNull ( $ this -> cache -> load ( 'id1_3' ) ) ; $ this -> assertNull ( $ this -> cache -> load ( 'tag1_1' , 'tag' ) ) ; $ this -> assertNull ( $ localCache -> load ( 'id2_3' ) ) ; $ this -> assertNull ( $ localCache -> load ( 'tag2_1' , 'tag' ) ) ; unset ( $ localCache ) ; }
With multiple caches in play, calling flush(true) should remove all of
 the entries from the database regardless of which cache instance they
 are associated with.
With multiple caches in play calling flush ( true ) should remove all of the entries from the database regardless of which cache instance they are associated with .
// prefix cache keys // prefix cache tags // wether to enable tagging /** @var AbstractPdo */