Title: Changing theme does not invalidate cache
Last modified: July 6, 2023

---

# Changing theme does not invalidate cache

 *  Resolved [atoomic](https://wordpress.org/support/users/atoomic/)
 * (@atoomic)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/changing-theme-does-not-invalidate-cache/)
 * When activating a different theme whereas WP Super Cache is enabled, the cache
   is not purged.
 * We have to either:
    - click on “Delete Cache” action from “WP Super Cache Settings” in wp-admin
    - or perform a call to the REST API /cache to clear the cache
 *     ```wp-block-code
       POST /wp-json/wp-super-cache/v1/cache 
       { "all": true }
   
       # Reply:
       'Cache Cleared': true
       ```
   
 * Steps to reproduce:
    - enable WP Super Cache
    - access index page from your browser
    - in wp-admin activate a different theme
    - access index page and notice the previous cache is still used

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/changing-theme-does-not-invalidate-cache/#post-16892376)
 * Thanks for reporting this, but it’s intentional. Quite often when the theme is
   changed it may be to test it out, or an error may happen when it’s changed.
 * If I was interested in changing the theme, I would disable caching for logged-
   in users. However, it would be useful if the plugin displayed a notice on the
   themes page after a theme was activated to make it easier for an admin user to
   clear the cache. I’ve created an [enhancement request](https://github.com/Automattic/jetpack/issues/31859)
   to track progress on this.
 *  Thread Starter [atoomic](https://wordpress.org/support/users/atoomic/)
 * (@atoomic)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/changing-theme-does-not-invalidate-cache/#post-16901399)
 * thanks for confirming this is a feature 🙂 and not a bug
 *  [toddrin](https://wordpress.org/support/users/toddrin/)
 * (@toddrin)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/changing-theme-does-not-invalidate-cache/#post-16901438)
 * I understand your concern however I can also see people being surprised that 
   changing a theme or plugin doesn’t invalidate the cache.
 * IMO this would be a useful option to invalidate based on plugin/theme change 
   even if it’s not default?
 *  Plugin Support [Alin (a11n)](https://wordpress.org/support/users/alinclamba/)
 * (@alinclamba)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/changing-theme-does-not-invalidate-cache/#post-16915749)
 * Hi [@toddrin](https://wordpress.org/support/users/toddrin/),
 * I have taken note of your proposed [enhancement request](https://github.com/Automattic/jetpack/issues/31859).
   However, implementing this may not be straightforward, and it is not feasible
   to guarantee that we will be able to carry it out. The discussion regarding this
   matter will persist in the corresponding Github issue. For the time being, I 
   will consider this thread as resolved. Thank you for your understanding!

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

The topic ‘Changing theme does not invalidate cache’ is closed to new replies.

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

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)

 * 4 replies
 * 4 participants
 * Last reply from: [Alin (a11n)](https://wordpress.org/support/users/alinclamba/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/changing-theme-does-not-invalidate-cache/#post-16915749)
 * Status: resolved