コード例 #1
0
 public function testQueryCache()
 {
     $this->assertFalse($this->cache->containsQuery('foo'));
     $defaultQueryCache = $this->cache->getQueryCache();
     $fooQueryCache = $this->cache->getQueryCache('foo');
     $this->assertInstanceOf('Doctrine\\ORM\\Cache\\QueryCache', $defaultQueryCache);
     $this->assertInstanceOf('Doctrine\\ORM\\Cache\\QueryCache', $fooQueryCache);
     $this->assertSame($defaultQueryCache, $this->cache->getQueryCache());
     $this->assertSame($fooQueryCache, $this->cache->getQueryCache('foo'));
     $this->cache->evictQueryRegion();
     $this->cache->evictQueryRegion('foo');
     $this->cache->evictQueryRegions();
     $this->assertTrue($this->cache->containsQuery('foo'));
     $this->assertSame($defaultQueryCache, $this->cache->getQueryCache());
     $this->assertSame($fooQueryCache, $this->cache->getQueryCache('foo'));
 }
コード例 #2
0
 protected function evictRegions()
 {
     $this->cache->evictQueryRegions();
     $this->cache->evictEntityRegions();
     $this->cache->evictCollectionRegions();
 }