Title: Clear Pods Cache Programmatically
Last modified: April 26, 2023

---

# Clear Pods Cache Programmatically

 *  Resolved [richard50](https://wordpress.org/support/users/richard50/)
 * (@richard50)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/clear-pods-cache-programmatically/)
 * Please can you direct me to the PHP code I need to use to call “Clear Pods Cache”?
   i.e. what happens when I click the button on the Pods Settings page.
 * Every week or so, we need to clear the cache because the Search and permalinks
   stop working. I would like to automate the clear cache every day to keep the 
   site running.
 * Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Scott Kingsley Clark](https://wordpress.org/support/users/sc0ttkclark/)
 * (@sc0ttkclark)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/clear-pods-cache-programmatically/#post-16689576)
 * Have you previously reported the issue with your search/permalinks? I’d love 
   to help solve those underlying issues too.
 * For clearing the Pods cache, you can call `pods_api()->cache_flush_pods();`
 *  Thread Starter [richard50](https://wordpress.org/support/users/richard50/)
 * (@richard50)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/clear-pods-cache-programmatically/#post-16689631)
 * Thank you very much for the code.
 * Yes, I reported the issue with search and permalinks here:
   [https://wordpress.org/support/topic/need-to-clear-pods-cache-often/](https://wordpress.org/support/topic/need-to-clear-pods-cache-often/)
 * But I have found it hard to know how to track down the issue. Once the caches
   have been cleared, the problem doesn’t occur again until a week or so later. 
   So it’s not something that is easily reproducible.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Clear Pods Cache Programmatically’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [richard50](https://wordpress.org/support/users/richard50/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/clear-pods-cache-programmatically/#post-16689631)
 * Status: resolved