Title: [Plugin: DB Cache] Two questions
Last modified: August 19, 2016

---

# [Plugin: DB Cache] Two questions

 *  [Claudio Simeone](https://wordpress.org/support/users/mrbrown/)
 * (@mrbrown)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-db-cache-two-questions/)
 * Hi all,
    this is a great plugin, but before I install in a producition enviroment,
   I have two questions:
 * 1) Does it work with WP Super Cache?
    I wold to try both the plugins active. 
   Are there some issues or they can work together?
 * 2) The Cleaning Hooks and the Editing Workflow
    I noticed that the cache is cleaned
   every time a post is edited or published. Eg.
 * `add_action('publish_post', 'dbc_clear', 0);`
 * At the moment we have more than 1000 posts in our website. The caching of frontend
   it’s OK. But regarding the backend, our editing workflow needs that a post is
   edited more than 10 times before it’s published.
    I think that if I disable the
   hooks, I could have problems with data freshness after update queries. So, the
   questions are:
 * does this feature can affect the CPU every time I edit a post because the cache
   files are all deleted?
    Let’s say that I save a post every 5 minutes and I have
   more than 100 cache files generated by frontend queries. They will be deleted
   all, right?
 * Or is there a way to **delete only cached files created by backend operations**?
   
   Or if it is not possible, at least not to cache backend queries.
 * Thanks in advance

Viewing 1 replies (of 1 total)

 *  [pinoyca](https://wordpress.org/support/users/pinoyca/)
 * (@pinoyca)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-db-cache-two-questions/#post-986443)
 * 1) Oui, monsieur.
 * 2) `dbc_clear` only deletes expired cache files.
 * 3) some queries and situations are automatically skipped:
 *     ```
       // cache only frontside
       if (
       	defined('DOING_CRON') || strpos($_SERVER['REQUEST_URI'],'wp-admin') ||
       	strpos($_SERVER['REQUEST_URI'],'wp-login') || strpos($_SERVER['REQUEST_URI'],'wp-register') || strpos($_SERVER['REQUEST_URI'],'wp-signup') ||
       	preg_match("/\\s*(insert|delete|update|replace|alter|SET NAMES|FOUND_ROWS)/si",$query)
       ) $dbc_cachable = false;
   
       // for hard queries
       if (preg_match("/\\s*(JOIN | \* |\*\,)/si",$query)) $dbc_cachable = true;
       ```
   
 * 3) Yes
    4) No, see #2 5) See above conditions.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: DB Cache] Two questions’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [pinoyca](https://wordpress.org/support/users/pinoyca/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-db-cache-two-questions/#post-986443)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
