title: Does Rails cache templates?
body: <p>I assume yes, and some tests point to yes, but I'd like to find the documentations that says Rails caches (unevaluated) templates in memory.</p>
  
  <p>That is, for any <code>.erb</code>, <code>.sass</code>, <code>.jbuilder</code>, etc template Rails will:  </p>
  
  <ol>
  <li><strong>read the template from file, only once</strong></li>
  <li><strong>retrieve the template from memory when needed</strong></li>
  <li>apply data to the template on every invocation unless the <em>generated output</em> is cached.</li>
  </ol>
  
  <p>All template/cache searches and documentation seem to be focused on point #3. And development Rails flags enable/disable <em>class-caching</em>. But finding docs that verify claim #1/#2 seem illusive. Does Rails re-read template files every time and rely on OS level file caching?</p>