Linux 软件免费装
Banner图

Clear Cache Everywhere

开发者 apos37
更新时间 2025年5月7日 23:21
PHP版本: 7.4 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

cache performance admin bar clear cache flush cache

下载

详情介绍:

Clear Cache Everywhere allows administrators to instantly clear various cache sources directly from the WordPress admin bar. This ensures changes are reflected immediately without waiting for cache expiration. Features: By default, clearing the cache will execute the following actions: Integrations: The plugin already supports clearing cache for the following third-party plugins: This plugin is ideal for developers, content managers, and site owners who need immediate cache flushing across multiple layers.

安装:

  1. Upload the plugin files to the /wp-content/plugins/clear-cache-everywhere/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. The Clear Cache button will appear in the admin bar.

常见问题:

How does this plugin clear cache?

It flushes WordPress object cache, transients, sessions, rewrite rules, and any configured third-party caches. If a hosting cache purge URL is set, it will be called as well. Additionally, it forces browsers to reload fresh content.

Does this work with all hosting providers?

This depends on your hosting provider. If they offer a cache purge URL, you can configure it in the plugin settings. For example, if you have GoDaddy's Website Security and Backups, you can navigate to Firewall > Settings > Performance > Clear Cache, then grab the Clear Cache API link.

Will this force browsers to load fresh content?

Yes! The plugin sends cache-control headers to prompt browsers to reload updated content.

Can I add custom cache clearing actions?

Yes! Developers can hook into cceverywhere_after_clear_cache and cceverywhere_custom_settings: `<?php // Action to purge a custom cache directory after clearing cache add_action( 'cceverywhere_after_clear_cache', function() { // Check if the custom cache purge option is enabled $prefix = 'clear_cache_everywhere_'; if ( get_option( $prefix . 'purge_custom_cache_directory', false ) ) { // Purge a custom cache directory $cache_dir = WP_CONTENT_DIR . '/cache/myplugin/'; if ( file_exists( $cache_dir ) ) { array_map( 'unlink', glob( $cache_dir . '*' ) ); } } } ); // Filter to add custom settings field for the action above add_filter( 'cceverywhere_custom_settings', function( $fields ) { // Define a custom checkbox field $fields[] = [ 'key' => 'purge_custom_cache_directory', 'title' => ( 'Purge Custom Cache Directory', 'clear-cache-everywhere' ), 'type' => 'checkbox', 'sanitize' => 'sanitize_checkbox', 'section' => 'custom', 'default' => FALSE, 'comments' => ( 'Enable this option to automatically purge a custom cache directory (e.g., for your plugin\'s cache). The cache will be cleared after the global cache is cleared.', 'clear-cache-everywhere' ), ]; return $fields; } ); ?>`

Is there a function to trigger clearing cache everywhere?

Yes! A helper function is available for you to use: cceverywhere_clear_all( $log_results = false ). The function returns the results of the cache clearing processing. Optionally, you can log the results by setting the $log_results parameter to true. This will log the results to the debug log.

Where can I request features and get further support?

Join my Discord support server

更新日志:

1.0.2.1 1.0.2 1.0.1