Answers.Body: <p>The manage groups page does not force a refresh of the smart group cache but there is a button to do so on the right-hand side:
  <img src="https://i.sstatic.net/O0bK4.png" alt="Smart group refresh"></p>
  
  <p>Without clicking that button, what it does do is count the number of contacts already in the cache, but this query has been optimized and tested against a very large (6 million group_contact records) database.</p>
  
  <p>You'll find more information at <a href="https://issues.civicrm.org/jira/browse/CRM-15107" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-15107</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-02T05:52:49.420Z
Answers.Text: We learn something new everyday ;-) Thanks helped me answer a question about how to deal with Smart Groups showing as having 0 contacts at Manage Groups
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-25T16:39:57.057Z
Answers.Text: Thanks! Just figured this out: in Group/Page/Group.php there's a call to fillIfEmpty() that refreshes the cache only if the smart group cache has literally _nothing at all_. That's where I was going wrong - the cache was empty on my first test, then I was manually truncating to test it.
Answers.UserDisplayName: Andrew West
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-25T01:47:58.783Z
Answers.LastActivityDate: 2015-03-25T02:09:44.527Z
Answers.LastEditDate: 2015-03-25T02:09:44.527Z
Answers.UserDisplayName: Coleman
Body: <p>The Manage Groups page in Civi 4.5+ displays counts of contacts in each group, and in the process refreshes the smart group contact cache. We've turned off this cache elsewhere as it takes 10mins to complete (we have a <em>lot</em> of groups) - but the Manage Groups page seems to force a refresh. Is there a way to disable this refresh?</p>
  
  <p>I can't see a setting, so am assuming it'd involve commenting out some code. I found the code in Contact/BAO/Group.php that I think disables the <em>count</em> of the contacts, but can't figure out where the cache-refresh itself takes place.</p>
  
Tags: <groups><smartgroups><cache>
Title: How to disable cache refresh on Manage Groups page
ThreadText: # How to disable cache refresh on Manage Groups page
  
  (Asked by: username_0 on 2015-03-24)
  
  The Manage Groups page in Civi 4.5+ displays counts of contacts in each group, and in the process refreshes the smart group contact cache. We've turned off this cache elsewhere as it takes 10mins to complete (we have a *lot* of groups) - but the Manage Groups page seems to force a refresh. Is there a way to disable this refresh?
  
  I can't see a setting, so am assuming it'd involve commenting out some code. I found the code in Contact/BAO/Group.php that I think disables the *count* of the contacts, but can't figure out where the cache-refresh itself takes place.
  
  **Tags:** groups, smartgroups, cache
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-03-25. Score: 6 | Accepted answer
  
  The manage groups page does not force a refresh of the smart group cache but there is a button to do so on the right-hand side:
  ![Smart group refresh](https://i.sstatic.net/O0bK4.png)
  
  Without clicking that button, what it does do is count the number of contacts already in the cache, but this query has been optimized and tested against a very large (6 million group\_contact records) database.
  
  You'll find more information at <https://issues.civicrm.org/jira/browse/CRM-15107>
  
  > **Comments:**
  > **username_0**: Thanks! Just figured this out: in Group/Page/Group.php there's a call to fillIfEmpty() that refreshes the cache only if the smart group cache has literally _nothing at all_. That's where I was going wrong - the cache was empty on my first test, then I was manually truncating to test it.  
  > **username_2**: We learn something new everyday ;-) Thanks helped me answer a question about how to deal with Smart Groups showing as having 0 contacts at Manage Groups  
  
  ---
  
  