WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Adding a "Clear Cache" button accessible by blog administrators (4 posts)

  1. dvmorris
    Member
    Posted 3 years ago #

    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

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. dvmorris
    Member
    Posted 3 years ago #

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

    Dave

  4. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    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? :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic