Title: DB cache flush
Last modified: March 11, 2025

---

# DB cache flush

 *  Resolved [mandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * (@lukomandigo97)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/)
 * Hello, I have been using the w3 cache plugin for about 2 weeks. I subscribed.
   My saves are set up like this:
 * Page cache Disk: Enhanced
 * Object Cache (Redis)
 * Database Cache (Redis)
 * The big problem is that I noticed an awful lot of cache deletions.
 * What can I do about it? From the debug I found out that rankmath seo is clearing
   the cache. I managed to solve this, but still these numbers:
 * Calls/period: 1,138,147
 * Calls/sec: 385.0
 * Hit rate: 5 %
 * Cache flushes: 18,086
 * Time taken: 1,366,482 ms
 * What I’m still using is woocommerce. But I don’t know how to proceed. Unfortunately,
   I don’t know much about debugging. There was 1 flush event, that’s also woocommerce,
   but it doesn’t run more than ten thousand times per minute. I would like some
   help and ideas on what is causing this. Unfortunately, it is quite difficult 
   to create a cache on the site like this.

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18355329)
 * Hello [@lukomandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * Thank you for reaching out and I am happy to help!
   Can you please share if those
   nubers are for Page Cahcing or DB caching and depending on that, have you enabled
   the Purge logs for specific module that will show what triggered the purge?
 * Thanks!
 *  Thread Starter [mandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * (@lukomandigo97)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18356395)
 * This is the db cache. What I find strange is that the radish itself never emptied.
   It has 5GB of storage space, but it fills up very quickly. The hit rate is around
   90%, which is pretty good. The DB cache is very low, only between 5-10%, which
   I mentioned. But why isn’t redis deleted when the flush all command is run? Is
   it possible that the problem isn’t the deletion, but that redis itself is full
   and the db cache is deleted because there isn’t enough space to store it?
 * Redis policy: allkeys-lru
 * Cache lifetime: 3 days
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18357019)
 * Hello [@lukomandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * Thank you your feedback.
   Can you please try to mannually flush Redis:
    - [FLUSHDB](http://redis.io/commands/flushdb) – clears currently active database
    - [FLUSHALL](http://redis.io/commands/flushall) – clears all the existing databases
 * Are you using a single Redis instance for both Object Cahcing and DB Cahcing
 * Thanks!
 *  Thread Starter [mandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * (@lukomandigo97)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18357063)
 * The command has been executed.
 * If I understand correctly, they need to be stored in a separate redis instance?
   Or do I need to create a redis namespace? I haven’t done this before 🙂
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18357591)
 * Hello [@lukomandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * Thank you for your feedback.
   This depends on the website, however ideally you
   should use a separate Redis instance to avoid this. The reason is that you are
   using both DB and Object Caching, and there are a lot of objects to be cached
   😀You may want to only use Object Caching instead of using both
 * I hope this helps!
 *  Thread Starter [mandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * (@lukomandigo97)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18358617)
 * I managed to set a new database id. But I don’t see much change, the hit rate
   is now around 15-20%. I don’t really understand the flush number, it has decreased,
   but does this show the flush number at that minute or all-time? Unfortunately
   it’s still quite slow, or is there another idea?
 * The statistics don’t indicate it, but the database size is this: db1:keys=228751,
   expires=228747,avg_ttl=236149554
 *  Thread Starter [mandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * (@lukomandigo97)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18358753)
 * and 1 more comment, if this means anything. The object cache is not used in the
   statistics.
 * But if I go to the object cache menu item, this is what I get:
 * Object caching via **Redis** is currently **enabled**.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18358904)
 * Hello [@lukomandigo97](https://wordpress.org/support/users/lukomandigo97/)
 * Can you please share the website URL and what exactly is slow?
 * Thanks!

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

The topic ‘DB cache flush’ is closed to new replies.

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

 * 8 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/db-cache-flush/#post-18358904)
 * Status: resolved