Title: How to flush Object Cache programmatically?
Last modified: July 19, 2023

---

# How to flush Object Cache programmatically?

 *  Resolved [efintina](https://wordpress.org/support/users/efintina/)
 * (@efintina)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-flush-object-cache-programmatically/)
 * Hi,
 * I need to make certain updates using triggers on the MySQL database. Everything
   is OK. In order for the changes made to be visible, I think it is necessary to
   empty the Object Cache. I know this can be done by calling the internal WP function
   wp_cache_flush().
 * My question is related to whether it is okay to use this function together with
   Docket Cache or is it possible to call a specific Docket Cache function.
   Could
   you help me, please?
 * All the best,
   Eugen

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

 *  Plugin Author [Nawawi Jamili](https://wordpress.org/support/users/nawawijamili/)
 * (@nawawijamili)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-flush-object-cache-programmatically/#post-16906511)
 * Hi there,
 * Yes, you may use “wp_cache_flush()” to flush the cache, it directly calls the
   Docket Cache internal class method [Filesystem::cachedir_flush()](https://github.com/nawawi/docket-cache/blob/master/includes/src/Filesystem.php#L999).
 * For your reference:
    1. [WP_Object_Cache::dc_flush()](https://github.com/nawawi/docket-cache/blob/master/includes/cache.php#L1202)
    2. [wp_cache_flush()](https://github.com/nawawi/docket-cache/blob/master/includes/cache.php#L2270)
 * Thanks.
 *  Thread Starter [efintina](https://wordpress.org/support/users/efintina/)
 * (@efintina)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-flush-object-cache-programmatically/#post-16906848)
 * Thank you very much for your quick reply. Now I can rest easy and move the website
   into production.
 * It’s a great plugin and the support is beyond great.
 * All the best,
   Eugen

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

The topic ‘How to flush Object Cache programmatically?’ is closed to new replies.

 * ![](https://ps.w.org/docket-cache/assets/icon-256x256.png?rev=2425893)
 * [Docket Cache - Object Cache Accelerator](https://wordpress.org/plugins/docket-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/docket-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/docket-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/docket-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/docket-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/docket-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [efintina](https://wordpress.org/support/users/efintina/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-flush-object-cache-programmatically/#post-16906848)
 * Status: resolved