Title: Clear cache why delete directory level ?
Last modified: July 17, 2018

---

# Clear cache why delete directory level ?

 *  Resolved [George Liu](https://wordpress.org/support/users/eva2000/)
 * (@eva2000)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-why-delete-directory-level/)
 * Hi I am benchmarking and testing my Cache Enabler implementation against other
   WP cacheing plugins at [https://community.centminmod.com/threads/15211/](https://community.centminmod.com/threads/15211/)
   and was wondering why Cache Enabler is deleting entire cache directory when you
   clear the cache as opposed to just clearing the contents within the cache directory
   that gets created ?
 * cheers
 * George

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

 *  [codyarsenault](https://wordpress.org/support/users/codyarsenault/)
 * (@codyarsenault)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-why-delete-directory-level/#post-10501462)
 * Can you clarify the issue a bit further? Do you mean that when you clear the 
   CE cache it is deleting /cache instead of just /cache-enabler?
 *  Thread Starter [George Liu](https://wordpress.org/support/users/eva2000/)
 * (@eva2000)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-why-delete-directory-level/#post-10501677)
 * when i hit save changes in cache enabler settings pages it totally removes /wp-
   content/cache/cache-enabler/mydomain.com directory only recreating it after a
   few requests repopulate the cache
 * hitting save changes notes = Saving these settings will clear the complete cache.
 * as opposed to what I expected to just deleting contents within /wp-content/cache/
   cache-enabler/mydomain.com/* which the clear cache link in admin does ?
    -  This reply was modified 7 years, 10 months ago by [George Liu](https://wordpress.org/support/users/eva2000/).
 *  [codyarsenault](https://wordpress.org/support/users/codyarsenault/)
 * (@codyarsenault)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-why-delete-directory-level/#post-10502441)
 * I just tested this on a new WP instance and in both cases, clearing the cache
   deletes the /cache-enabler directory. This is the same behavior as running a 
   cron job with the rule we’ve defined on the Cache Enabler support page (rm -rf/
   path/to/your/wordpress/wp-content/cache/cache-enabler/).
 * Is there a reason why you want to have the plugin remove just the contents within
   the cache-enabler directory as opposed to deleting the directory itself?
 *  Thread Starter [George Liu](https://wordpress.org/support/users/eva2000/)
 * (@eva2000)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-why-delete-directory-level/#post-10502703)
 * On benchmark tests for the first initial run without any cache directory seems
   slightly slower than if the directory already existed. FYI, for cronjob for advanced
   cache config purge i have just been emptying out the directory not removing the
   directory itself as well

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

The topic ‘Clear cache why delete directory level ?’ is closed to new replies.

 * ![](https://ps.w.org/cache-enabler/assets/icon.svg?rev=2442383)
 * [Cache Enabler](https://wordpress.org/plugins/cache-enabler/)
 * [Support Threads](https://wordpress.org/support/plugin/cache-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/cache-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cache-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cache-enabler/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [George Liu](https://wordpress.org/support/users/eva2000/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-why-delete-directory-level/#post-10502703)
 * Status: resolved