Answers.Body: <p>Craft can render html yes... it's a pretty core element of it lol. </p>
  
  <p>By flat do you mean completely non-dynamic?
  Normally "flat html" means to just use "html" files and not rely on any sort of dynamic system like a CMS.</p>
  
  <p>Or do you mean to flatten the code? As in to minify it? In which case craft can do that yes. <code>{% spaceless %}&lt;html&gt;     &lt;/html&gt;{% endspaceless %}</code> will become <code>&lt;html&gt;&lt;/html&gt;</code></p>
  
  <p>On top of that it does have its own <a href="http://buildwithcraft.com/docs/templating/cache" rel="nofollow">{% cache %} tags</a> too (which definitely speeds things up), again you will need to wrap the appropriate cache tags around the bits of your site you want to cache.</p>
  
  <p>Also be wary of cloudfront, it doesn't always speed things up, sometimes can make websites run slower. Though it does offer DDOS protection.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-11T17:03:40.590Z
Answers.Text: `cache` tags FTW!
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-11T14:33:37.640Z
Answers.LastActivityDate: 2015-09-11T15:59:21.303Z
Answers.LastEditDate: 2015-09-11T15:59:21.303Z
Answers.UserDisplayName: joep
Answers.Body: <blockquote>
    <p>I've come to understand that if Craft CMS can render flat html or cache some of the pages then it makes thing a lot quicker to load</p>
  </blockquote>
  
  <p>I believe you're looking for the the <a href="http://buildwithcraft.com/docs/templating/cache" rel="nofollow"><code>{% cache %}</code></a> tag, which will – on the first page request – capture the compiled HTML output inbetween the opening and closing of the tag, and write it to the database. On subsequent requests, Craft will pull and output the compiled (flat) HTML using a single SQL query (until the cache expires, is cleared manually or any entries, categories etc. involved is changed). This means that for most pageloads, complex database queries or taxing PHP operations (Twig templates are compiled to PHP) can be eliminated, which is usually a performance boost.</p>
  
  <blockquote>
    <p>will it will be ok using assets from a cloud front CDN setup too?</p>
  </blockquote>
  
  <p>Yep, Craft is easily set up with external asset sources, and S3/CloudFront is supported. You will need a Craft Pro license, though.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-13T23:08:03.103Z
Answers.Text: Great answer; minor nitpick: S3 and CloudFront are 2 different services (as much as Amazon would like you to use both). You don't need to host your assets on S3 (anymore unless you want) to take advantage of CloudFront and you don't need a Craft Pro account to use any CDN (assuming the CDN supports using origin pull) since every Craft version supports external assets.
Answers.UserDisplayName: RitterKnight
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-20T21:44:02.420Z
Answers.Text: The cache tag is definitely a step in the right direction, but it still introduces a not-insignificant delay by bootstrapping Yii and Craft. The way around that is to use a static file cache as mentioned in this thread: https://craftcms.stackexchange.com/a/14681/5437
Answers.UserDisplayName: Simon East
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-13T19:10:39.110Z
Answers.LastActivityDate: 2015-09-13T19:10:39.110Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Body: <p>Having spoken to our 'ops guy' I've come to understand that if Craft CMS can render flat html or cache some of the pages then it makes thing a lot quicker to load etc.</p>
  
  <p>Is this something craft can do? Also will it will be ok using assets from a cloud front CDN setup too?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T21:40:00.113Z
Comments.Text: It seems this question was asked previously, so you might find some advice there: [Are there any file-based static cache options for Craft CMS?](https://craftcms.stackexchange.com/questions/10241/are-there-any-file-based-static-cache-options-for-craft-cms)
Comments.UserDisplayName: Simon East
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T22:08:55.130Z
Comments.Text: @SimonEast Despite the similarities, I believe these two people are actually asking about different things. This seems clear based on their (very different) accepted answers. One poster is specifically looking for flat-file caching, the other is looking for flat files "or something", and is quite happy with a non-file solution.
Comments.UserDisplayName: Lindsey D
Tags: <cache>
Title: Can Craft or any of its plugins render down flat html files for speed
ThreadText: # Can Craft or any of its plugins render down flat html files for speed
  
  (Asked by: username_0 on 2015-09-11)
  
  Having spoken to our 'ops guy' I've come to understand that if Craft CMS can render flat html or cache some of the pages then it makes thing a lot quicker to load etc.
  
  Is this something craft can do? Also will it will be ok using assets from a cloud front CDN setup too?
  
  **Tags:** cache
  
  > **Comments:**
  > **username_1**: It seems this question was asked previously, so you might find some advice there: [Are there any file-based static cache options for Craft CMS?](https://craftcms.stackexchange.com/questions/10241/are-there-any-file-based-static-cache-options-for-craft-cms)  
  > **username_2**: @username_1 Despite the similarities, I believe these two people are actually asking about different things. This seems clear based on their (very different) accepted answers. One poster is specifically looking for flat-file caching, the other is looking for flat files "or something", and is quite happy with a non-file solution.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2015-09-13. Score: 4 | Accepted answer
  
  > I've come to understand that if Craft CMS can render flat html or cache some of the pages then it makes thing a lot quicker to load
  
  I believe you're looking for the the [`{% cache %}`](http://buildwithcraft.com/docs/templating/cache) tag, which will – on the first page request – capture the compiled HTML output inbetween the opening and closing of the tag, and write it to the database. On subsequent requests, Craft will pull and output the compiled (flat) HTML using a single SQL query (until the cache expires, is cleared manually or any entries, categories etc. involved is changed). This means that for most pageloads, complex database queries or taxing PHP operations (Twig templates are compiled to PHP) can be eliminated, which is usually a performance boost.
  
  > will it will be ok using assets from a cloud front CDN setup too?
  
  Yep, Craft is easily set up with external asset sources, and S3/CloudFront is supported. You will need a Craft Pro license, though.
  
  > **Comments:**
  > **username_5**: Great answer; minor nitpick: S3 and CloudFront are 2 different services (as much as Amazon would like you to use both). You don't need to host your assets on S3 (anymore unless you want) to take advantage of CloudFront and you don't need a Craft Pro account to use any CDN (assuming the CDN supports using origin pull) since every Craft version supports external assets.  
  > **username_1**: The cache tag is definitely a step in the right direction, but it still introduces a not-insignificant delay by bootstrapping Yii and Craft. The way around that is to use a static file cache as mentioned in this thread: https://craftcms.stackexchange.com/a/14681/5437  
  
  ---
  
  ### Answer by username_3 on 2015-09-11. Score: 2
  
  Craft can render html yes... it's a pretty core element of it lol.
  
  By flat do you mean completely non-dynamic?
  Normally "flat html" means to just use "html" files and not rely on any sort of dynamic system like a CMS.
  
  Or do you mean to flatten the code? As in to minify it? In which case craft can do that yes. `{% spaceless %}<html> </html>{% endspaceless %}` will become `<html></html>`
  
  On top of that it does have its own [{% cache %} tags](http://buildwithcraft.com/docs/templating/cache) too (which definitely speeds things up), again you will need to wrap the appropriate cache tags around the bits of your site you want to cache.
  
  Also be wary of cloudfront, it doesn't always speed things up, sometimes can make websites run slower. Though it does offer DDOS protection.
  
  > **Comments:**
  > **username_2**: `cache` tags FTW!  
  
  ---
  
  