Skip to content

Brugman/cache-bar

Repository files navigation

Cache Bar

A WordPress plugin that streamlines your cache clearing.

screenshot

Supported Plugins

Plugin Primary Cache Type
WP OPcache PHP OPcache
OPcache Manager PHP OPcache
LiteSpeed Cache Server-Side Page Cache
CLP Varnish Cache Server-Side Page Cache
WP Super Cache Page Cache
W3 Total Cache Page Cache
Cache Enabler Page Cache
WP Rocket Page Cache
Redis Object Cache Object Cache
CDN Enabler CDN

Configurations

Displaying the master toolbar

By default, the master toolbar is being shown to users with the Administrator role. It may make sense to lower this to include Editors but you have to make sure that your caching plugins also allow Editors to clear the cache. Here's a snippet to set the capability to Editor and above:

add_filter( 'ccc_add_toolbar', function ( $capability ) {
    return 'edit_pages';
});

Keep third party toolbars

By default, third party toolbars are hidden for everyone. You can set a high capability so they are still shown to some people, but this defeats the purpose of the plugin. Here's a snippet to set the capability to Administrator and above:

add_filter( 'ccc_keep_third_party_toolbars', function ( $capability ) {
    return 'manage_options';
});

Move toolbar to the right

add_filter( 'ccc_toolbar_position_right', '__return_true' );

Contributing

Found a bug? Anything you would like to ask, add or change? Please open an issue so we can talk about it.

Pull requests are welcome. Please try to match the current code formatting.

Author

Tim Brugman

About

A WordPress plugin that streamlines your cache clearing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages