title: How to use Memcached in Doctrine2 / ZF2?
body: <p>I have set up my code / directories / configuration as outlined in this article: <a href="http://www.jasongrimes.org/2012/01/using-doctrine-2-in-zend-framework-2/" rel="nofollow noreferrer">http://www.jasongrimes.org/2012/01/using-doctrine-2-in-zend-framework-2/</a></p>
  
  <p>So my config file looks something like:</p>
  
  <pre><code>&lt;?php
  namespace Game;
  
  return array(
  
      // &lt;snip&gt;
  
      // Doctrine config
      'doctrine' =&gt; array(
          'driver' =&gt; array(
              __NAMESPACE__ . '_driver' =&gt; array(
                  'class' =&gt; 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
                  'cache' =&gt; 'array',
                  'paths' =&gt; array(__DIR__ . '/../src/' . __NAMESPACE__ . '/Entity')
              ),
              'orm_default' =&gt; array(
                  'drivers' =&gt; array(
                      __NAMESPACE__ . '\Entity' =&gt; __NAMESPACE__ . '_driver'
                  )
              )
          )
      ),
  );
  </code></pre>
  
  <p>Now, what do I need to set/change to make Doctrine use Memcached as its caching backend? I have searched a lot on Google, but other than in <a href="https://stackoverflow.com/questions/12373142/add-caching-to-zend-form-annotation-annotationbuilder">this question</a>, where it says they got it working (but not how), I have not been able to find anything.</p>