Cleaning the civi cache updates the Smart Groups immediately (instead of waiting 5 minutes).

Is there a way to clean the civi cache directly (instead of Menu>Administer>SystemSettings>Cleanupcache&updatepaths>Cleanup Caches)

(I am not a programmer, but I may be able to include it in a small php program, if I am told how to do it).

  • 2
    You could do an SQL query using phpAdmin on your database, but seems a bit fiddly when the UI way is easier..... – Tony Horrocks Nov 20 '18 at 18:16
  • There is an SQL query which can clean the civi cache ? – Jacques-Marie Moranne Nov 21 '18 at 10:03

You will find different ways of clearing cache (as Jon mentions) documented HERE, but I agree with Tony that perhaps the UI would be easier - maybe it's just a question of adding a top menu item on the navigation menu or a button that will trigger /civicrm/clearcache?

Hope this helps! Tamar


There are a variety of methods, but the easiest is probably to download cv and use cv flush.


Expanding on Tamar's suggestion:

Go to Administer > Customize Data and Screens > Navigation Menu
Click Add Menu Item
Title: Clear Cache
Url: /civicrm/clearcache
Parent: leave as Top level, or configure as you like
Click Save

Refresh the page and you should find a new entry in your menus to clear the cache.

  • Thank you Aidan and Tamar : /civicrm/clearcache is probably close to the solution I am looking for (it's a simple URL) and is OK for me as an admin ; but what permission should I grant to a user to run it ? ... + I am then driven to the civicrm/dashboard : I would like the user to remain on the same node : is this possible ? – Jacques-Marie Moranne Nov 22 '18 at 14:05
  • BTW, what is the (php ?) program which runs clearcache ? – Jacques-Marie Moranne Nov 22 '18 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.