Answers.Body: <p>The rebuild job will build any smart groups that are not yet built. It is a good idea to run this job often if you hate your server or being able to see counts on the manage groups page is more important to you than your server not hanging. Otherwise the rebuild groups scheduled job has no benefit.</p>
  
  <p>If you do not run that job then smart groups will be built on demand. This is particularly suitable if you have a lot of smart groups. If group has expired it will be flushed and rebuilt.</p>
  
  <p>Note I DO recommend running the job that flushes expired groups by scheduled job - just not the one that rebuild them all, even the ones you don't really need</p>
  
  <p>I've put up a PR on this <a href="https://github.com/civicrm/civicrm-user-guide/pull/397" rel="noreferrer">https://github.com/civicrm/civicrm-user-guide/pull/397</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-04T22:56:30.177Z
Answers.LastActivityDate: 2019-07-04T23:03:57.497Z
Answers.LastEditDate: 2019-07-04T23:03:57.497Z
Answers.UserDisplayName: eileen
Body: <p>According to the UI (Administer > Customize Data and Screens > Search Preferences) the 'Smart group cache timeout' setting allows you to specify "the number of minutes to cache smart group contacts".</p>
  
  <p><a href="https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/#job_group_rebuild" rel="noreferrer">According to the documentation</a>, Job.group_rebuild "rebuilds the smart group cache" and has a recommended frequency of 'every time cron job is run'.</p>
  
  <p>Why do we have and need both these approaches to keeping our smart groups up to date? Isn't one enough?!</p>
  
Tags: <smartgroups>
Title: How do the Rebuild Smart Group Cache scheduled job and the Smart group cache timeout setting interact?
ThreadText: # How do the Rebuild Smart Group Cache scheduled job and the Smart group cache timeout setting interact?
  
  (Asked by: username_0 on 2019-07-04)
  
  According to the UI (Administer > Customize Data and Screens > Search Preferences) the 'Smart group cache timeout' setting allows you to specify "the number of minutes to cache smart group contacts".
  
  [According to the documentation](https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/#job_group_rebuild), Job.group\_rebuild "rebuilds the smart group cache" and has a recommended frequency of 'every time cron job is run'.
  
  Why do we have and need both these approaches to keeping our smart groups up to date? Isn't one enough?!
  
  **Tags:** smartgroups
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-04. Score: 6 | Accepted answer
  
  The rebuild job will build any smart groups that are not yet built. It is a good idea to run this job often if you hate your server or being able to see counts on the manage groups page is more important to you than your server not hanging. Otherwise the rebuild groups scheduled job has no benefit.
  
  If you do not run that job then smart groups will be built on demand. This is particularly suitable if you have a lot of smart groups. If group has expired it will be flushed and rebuilt.
  
  Note I DO recommend running the job that flushes expired groups by scheduled job - just not the one that rebuild them all, even the ones you don't really need
  
  I've put up a PR on this <https://github.com/civicrm/civicrm-user-guide/pull/397>
  
  
  ---
  
  