Answers.Body: <p>It's actually compiling Smarty templates, not PHP pages. There is no timeout on how long they are valid, as the underlying templates don't change.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-19T18:56:01.533Z
Answers.LastActivityDate: 2017-09-19T18:56:01.533Z
Answers.UserDisplayName: Joe Murray
Body: <p>I use civicrm on WPEngine hosting which does not allow php files to be generated on their live environment (if you are not logged in as admin). Because of this I generate the php files in the template_c folder while logged in as admin (for the frontend civicrm pages). This means every time a php file in the template_c folder has to be re-generated a frontend civicrm page will crash.</p>
  
  <p>Can someone give me a clue how long the generated php files in the template_c folder last so I can eventually re-generate them manually and avoid frontend civicrm page crashing? (or give me a better idea how to handle this).</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-19T17:32:11.290Z
Comments.Text: As far as I'm aware they don't have a time limit. Interesting to learn this about WPEngine - I'm working with an install hosted there. Can't say I'm impressed so far.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-20T03:00:39.057Z
Comments.Text: I'd argue that in general WPEngine is doing the "right thing" security-wise, preventing executables from being generated on-the-fly. Smarty, which as noted below is doing the generation, is a general-purpose framework and templates can be created from "regular" user input as well (e.g. civicrm mail templates are compiled to php executables). However this is somewhat odd given that WP allows editing the theme files from within WP, which is a ridiculous thing I think personally, but it means that WPEngine is maybe a little inconsistent, unless they disable that too.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-20T03:07:47.890Z
Comments.Text: Oops comment edit period expired - I see you said it can be done if logged in as admin, which then means they are still being consistent, since only admin can edit the theme files. So ignore my last sentence.
Comments.UserDisplayName: Demerit
Tags: <wordpress><cache>
Title: How long does the cache in the template_c folder last
ThreadText: # How long does the cache in the template_c folder last
  
  (Asked by: username_0 on 2017-09-17)
  
  I use civicrm on WPEngine hosting which does not allow php files to be generated on their live environment (if you are not logged in as admin). Because of this I generate the php files in the template\_c folder while logged in as admin (for the frontend civicrm pages). This means every time a php file in the template\_c folder has to be re-generated a frontend civicrm page will crash.
  
  Can someone give me a clue how long the generated php files in the template\_c folder last so I can eventually re-generate them manually and avoid frontend civicrm page crashing? (or give me a better idea how to handle this).
  
  **Tags:** wordpress, cache
  
  > **Comments:**
  > **username_1**: As far as I'm aware they don't have a time limit. Interesting to learn this about WPEngine - I'm working with an install hosted there. Can't say I'm impressed so far.  
  > **username_2**: I'd argue that in general WPEngine is doing the "right thing" security-wise, preventing executables from being generated on-the-fly. Smarty, which as noted below is doing the generation, is a general-purpose framework and templates can be created from "regular" user input as well (e.g. civicrm mail templates are compiled to php executables). However this is somewhat odd given that WP allows editing the theme files from within WP, which is a ridiculous thing I think personally, but it means that WPEngine is maybe a little inconsistent, unless they disable that too.  
  > **username_2**: Oops comment edit period expired - I see you said it can be done if logged in as admin, which then means they are still being consistent, since only admin can edit the theme files. So ignore my last sentence.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2017-09-19. Score: 2 | Accepted answer
  
  It's actually compiling Smarty templates, not PHP pages. There is no timeout on how long they are valid, as the underlying templates don't change.
  
  
  ---
  
  