title: How to make Doctrine lookups like Doctrine_table->find, ->findby* use the query/results cache (doctrine 1.2)
body: <p>For the first time I have set up a results cache in doctrine 1.24 by applying the following code:</p>
  
  <pre><code>$servers = array(
    'host'       =&gt; 'localhost',
    'port'       =&gt; 11211,
    'persistent' =&gt; true
  );
  $cacheDriver = new Doctrine_Cache_Memcache(
    array(
      'servers' =&gt; $servers,
      'compression' =&gt; false
    )
  );
  $manager-&gt;setAttribute(Doctrine::ATTR_RESULT_CACHE,$cacheDriver);
  $manager-&gt;setAttribute(Doctrine::ATTR_RESULT_CACHE_LIFESPAN, 3600 );
  </code></pre>
  
  <p>This works great for caching DQL quires such as:</p>
  
  <pre><code>enter code here$q = Doctrine_Query::create()
      -&gt;from('Software s')
      -&gt;leftJoin('s.Files f')
      -&gt;useResultCache();
  $q-&gt;execute();
  </code></pre>
  
  <p>However, What interests me is how do I cache table lookups such as:</p>
  
  <pre><code>xyzTable::getInstance()-&gt;findOneBySufff($stuff);
  </code></pre>
  
  <p>These are by far more frequent in my application code. 
  How do I achieve this? 
  Additionally, if anyone has a guide for using memcache with doctrine 1.2 I'd be more then happy. </p>