title: Symfony2 and Doctrine APC Cache
body: <p>i have read the documentation of symfony2 in relation to the performance and I have realized the following steps.</p>
  
  <ol>
  <li>Install APC 'php-apc' on my webserver and restart my webserver</li>
  <li><p>Modify my doctrine configuration</p>
  
  <pre><code>doctrine:
  
  dbal:
  
      driver:   "%database_driver%"
      host:     "%database_host%"
      port:     "%database_port%"
      dbname:   "%database_name%"
      user:     "%database_user%"
      password: "%database_password%"
      charset:  UTF8
  
     orm:
  
      auto_generate_proxy_classes: "%kernel.debug%"
      auto_mapping: true
      metadata_cache_driver: apc
      result_cache_driver: apc
      query_cache_driver: apc
  </code></pre></li>
  </ol>
  
  <p>Now if i call a action to retrieve all users from database i see in the information bar at the bottom that doctrine execute every time 114 queries. Why the queries not cached?</p>
  
  <p>My action look like this:</p>
  
  <pre><code>$users = $this-&gt;getDoctrine()-&gt;getRepository('AppUserBundle:User')-&gt;findAll();
  return $this-&gt;render('AppUserBundle:User:index.html.twig', array('users' =&gt; $users));
  </code></pre>