WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » [Plugin: WP Super Cache] Adding a "Clear Cache" button accessible by blog administrators

[Plugin: WP Super Cache] Adding a "Clear Cache" button accessible by blog administrators

  • dvmorris

    @dvmorris

    I would like to have a clear cache button that can work for a single blog, one that can clear the cache for the entire network, and one that clears out everything.

    I am running a large site with over 600 blogs, and bloggers are constantly complaining about issues related to caching, and I’d like to give everyone a button they can push that will only affect their blog or their network.

    How would I go about doing that?

    Thanks for your help,
    Dave

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Donncha O Caoimh

    @donncha

    There’s a function you can use called “wp_cache_clear_cache()” that will clear the cache for the current blog. Add a link wherever you like, but put a nonce on it and check the user level is high enough as you might have all users trying to clear the cache.

    dvmorris

    @dvmorris

    That seems to clear the cache for all blogs no matter which blog i’m on when I click the button…

    Dave

    Plugin Author Donncha O Caoimh

    @donncha

    Ah, that’s right. I’ve only ever used that on single blog installs. Unfortunately there’s no easy way of clearing the cache for a particular blog then. 🙁

    Want to submit a patch for a function that does just that? 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Super Cache] Adding a "Clear Cache" button accessible by blog administrators’ is closed to new replies.
Skip to toolbar