title: Memcache with Symfony/Doctrine is reloading data
body: <p>In my symfony project, I have a "complex" query that looks like:</p>
  
  <pre><code>$d = Doctrine_Core::getTable('MAIN_TABLE')
      // Create the base query with some keywords
  -&gt;luceneSearch($keywords)
  -&gt;innerJoin('w.T1 ws')
  -&gt;innerJoin('ws.T2 s')
      -&gt;innerJoin('w.T3 piv')
  -&gt;innerJoin('piv.T4 per')
  -&gt;innerJoin('w.T5 st')
      ...
  -&gt;innerJoin('doc.T12 docT')
  -&gt;innerJoin('w.Lang lng')
  -&gt;execute();
  </code></pre>
  
  <p>I added all those innerJoin to reduce the number of query due to my data model. Actually all data are recovered with this only query.... but the query took from 2 to 20 sec. depends on keywords.</p>
  
  <p>I decided to use memcache because data are not changing all the time.</p>
  
  <p>What I've done is configuring memcache and adding </p>
  
  <pre><code>...
  -&gt;useResultCache(true)
  -&gt;execute();
  </code></pre>
  
  <p>to my query.</p>
  
  <p>What is strange is that :</p>
  
  <ul>
  <li>The first time (when the cache is empty/flushed), only one query is execute</li>
  <li>The second time, ~130 ares executed and it take more time than the first...</li>
  </ul>
  
  <p>Those "new" queries are retrieving data from "inner join" for each record.</p>
  
  <p>What I don't undestand is why "innerjoined" data are not saved in the cache?</p>
  
  <p>I tried to change the hydrate mode but it seems not to be influent.</p>
  
  <p>Someone has an idea?</p>