Does it make sense to provide a button to clear a Blog Admin's cache?
A couple of thoughts:
- limit ability to clear cache to individual blogs
- 'throttle' it to limit abuse (once every 10 minutes?)
- limit access (admins? editors?)
Does it make sense to provide a button to clear a Blog Admin's cache?
A couple of thoughts:
While I understand your point, the cache is already cleared when a number of events happen. ie A comment or Post is published, the theme is changed, a widget is added or removed, etc. I would think those would be the only time the cache would need to be cleared.
Thanks much for your response!
Unfortunately, in my case, the cache does not appear to be cleared for /category/*, /tag/*, /etc/* (hence the reason for my post here).
In addition, although WP Super Cache may clear the cache when widgets are added/removed (I haven't tested that yet), it currently does not clear the cache when widgets are changed (or when WP-SuperCache unaware plugin options are updated). However, there appears to be a fix by adding the following code under line 367 of wp-includes/widgets.php
(thanks Ben!):
// Added to clear WP-Super Cache after the widgets are updated.
// Code by Elad Salomons http://www.ringofblogs.com
if(function_exists('wp_cache_no_postid')) {
wp_cache_no_postid(0);
}
FWIW, I started this post on the WPMU Forums instead of on the official WP Super Cache, because this question is WPMU-specific.
Glad to help. I'm not confident that this catches all the cases where the cache needs to be cleared, but it's a start.
Yeah... in all honesty, though, the bug (it's not a feature is it? ;-) should be fixed, rather than adding a 'failsafe' button...
BTW, I said 'Thanks Ben!' but didn't add a huge 'Thanks Elad!' in as well... And of course... 'Thanks Donncha!'... and while we're at it... 'Thanks Mom!'