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')); }
protected function evictRegions() { $this->cache->evictQueryRegions(); $this->cache->evictEntityRegions(); $this->cache->evictCollectionRegions(); }