title: CakePHP 3: find() with cache
body: <p>About the <code>get()</code> method, I read <a href="http://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#Cake%5CORM%5CTable::get" rel="nofollow">here</a>:</p>
  
  <blockquote>
    <p><strong>Like find()</strong> get has caching integrated. You can use the cache option when calling get() to perform read-through caching</p>
  </blockquote>
  
  <p>But later, in the section dedicated to the <code>find()</code> method (<a href="http://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#Cake%5CORM%5CTable::find" rel="nofollow">here</a>), the cache is not mentioned, there are no examples for the cache and the <code>cache</code> option is not mentioned among the supported options.</p>
  
  <p>So I would like to know: can I use the <code>cache</code> option with the <code>find()</code> method? If so, how?</p>
  
  <p>Thanks.</p>
  
  <hr>
  
  <p>Thanks to ndm. So:</p>
  
  <pre><code>$query = $this-&gt;Pages-&gt;find('all');
  $query-&gt;cache('all_pages');
  
  $this-&gt;set('pages', $query-&gt;all());
  </code></pre>
  
  <p>Or (more simple):</p>
  
  <pre><code>$query = $this-&gt;Pages-&gt;find('all')-&gt;cache('all_pages');
  
  $this-&gt;set('pages', $query-&gt;all());
  </code></pre>