<p>Jen doplním, že se zde nekonfiguruje EntityManager s aktivním kešováním metadat entit a DQL dotazů. V dokumentaci se silně doporučuje toto nějakým způsobem kešovat.</p>
<p><em>Do not use Doctrine without a metadata and query cache! Doctrine is highly optimized for working with caches. The main parts in Doctrine that are optimized for caching are the metadata mapping information with the metadata cache and the DQL to SQL conversions with the query cache. These 2 caches require only an absolute minimum of memory yet they heavily improve the runtime performance of Doctrine. The recommended cache driver to use with Doctrine is APC. APC provides you with an opcode-cache (which is highly recommended anyway) and a very fast in-memory cache storage that you can use for the metadata and query caches as seen in the previous code snippet.</em></p>
<p><a href="http://www.doctrine-project.org/projects/orm/2.0/docs/reference/configuration/en#bootstrapping:obtaining-an-entitymanager">http://www.doctrine-project.org/projects/orm/2.0/docs/reference/configuration/en#bootstrapping:obtaining-an-entitymanager</a></p>
<p>Nejjednodušší na použití je DoctrineCommonCacheArrayCache, která se aktivuje takto:</p>
<pre>$cache = new DoctrineCommonCacheArrayCache();
$config->setMetadataCacheImpl($cache);
$config->setQueryCacheImpl($cache);</pre>
Trending Articles
More Pages to Explore .....