Clear Cache for Me

Descripción

W3 Total Cache y WP Super Cache son grandes plugins de caché, pero no saben cuando se actualiza un widget. WPEngine es el mejor lugar para alojar tu instalación de WordPress, pero su sistema de caché no es más inteligente cuando se trata de actualizar widgets y menús. Creé este plugin porque mi web no veía ningún cambio al guardar widgets o menús usando estos sistemas de caché. Clear Cache For Me vaciará TODA tu caché cada vez que guardes sin tener que pulsar un botón adicional. Puede ser exagerado, que puede ser la razón por la que no está integrado, pero algunas personas necesitan simplicidad.

Además de limpiar esos molestos motores de caché, Clear Cache for Me puede forzar a tu navegador a recargar los archivos CSS y JS de tu tema actual. Yo modifico los archivos CSS y JS de mi tema de vez en cuando y siempre tengo problemas con que el navegador no reciba la última versión. Así que ahora, después de hacer clic en el botón «Vaciar caché ahora» del escritorio, el navegador se verá obligado a recargar los archivos CSS y JS del tema actual. Si no haces clic en el botón «Vaciar caché ahora», el navegador guardará en caché los archivos CSS y JS como lo hace normalmente.

Los populares temas de Qode tienen opciones para configurar tu propio CSS y JS. A veces puede que no veas tus cambios por un largo tiempo porque tu navegador está tratando de obtener el archivo cacheado. Cada vez que guardes las opciones de Qode, los archivos CSS y JS serán forzados a recargarse en el navegador del lado público.

Funciona con los siguientes plugins de caché:

  • Autoptimize
  • Breeze Cache
  • Cache Enabler
  • GoDaddy Cache
  • Kinsta Cache
  • LiteSpeed Cache
  • Elementor (CSS cache)
  • Premium Addons for Elementor
  • SiteGround SuperCacher
  • WP Fastest Cache
  • WP Optimize Cache
  • WP Rocket
  • WP Super Cache
  • W3 Total Cache
  • WPEngine Cache

Vacía toda la caché en las siguientes acciones (requiere que esté activo un sistema de caché de los de arriba):

  • Cuando se guardan widgets.
  • Cuando se guarda en el personalizador.
  • Cuando se guardan menús.
  • Cuando se guardan campos en Advanced Custom Fields.
  • Cuando se guarda un formulario de Contact Form 7.
  • Cuando se guarda un formulario de Formidable Form.
  • Cuando se guardan ajustes de WooThemes.
  • When NextGen Gallery albums and galleries are updated (beta – may not clear cache on all actions).
  • Cuando se guardan las opciones de Qode este plugin fuerza a los navegadores a recargar el CSS y el JS personalizados.
  • When a WP Forms forms or settings are saved.
  • Cuando se guardan ajustes de WooCommerce. (La caché ya debería vaciarse cuando se guardan productos.)
  • Cuando se guardan ajustes del plugin Insert Headers and Footers plugin de WPBeginner.
  • Cuando se guardan ajustes de una página de ajustes. Esto incluye ajustes del núcleo de WordPress, Yoast SEO y de la mayoría de plugins que usen la API de ajustes.
  • Cuando se actualiza WordPress.
  • Cuando se actualizan, activan o desactivan plugins.

See the plugin’s homepage for more details.

Note: Since some caching systems run in the shutdown hook, this plugin also runs in that hook. This means if PHP does not have enough time, some code including any hooks within the ccfm_clear_cache_for_all() function are not guaranteed to run. If you need code to run, consider using the ccfm_clear_cache_for_me_setup hook.

Opciones para desarrolladores

ccfm_supported_caching_exists

Use this filter to determine if this plugin should do anything including showing the button on the dashboard. Return true if a caching system is supported.
Default: True if any of the supported caching systems is active.
See Example 1 below.

ccfm_admin_init or ccfm_init_actions

Use this action to add hooks when cache is to be cleared. Or do any other setup activity.

ccfm_clear_cache_for_me_before

Use this action to clear cache from an unsupported caching system before the default caching systems clear their cache.

ccfm_clear_cache_for_me

Use this action to clear cache from an unsupported caching system after the default caching systems clear their cache.

Ejemplo

If you were using an unsupported caching system you’ll need to identify the caching plugin’s class or function which clears the cache. As an example, if the unsupported caching system called the MyOtherCache::clear_all() function, you would use the following code to get this plugin to clear the cache.

<?php
function my_other_cache_enable( $return = false ) {
    if ( class_exists( 'MyOtherCache' ) )
        return true;
    return $return;
}
add_filter('ccfm_supported_caching_exists', 'my_other_cache_enable');

function my_other_cache_clear() {
    if ( my_other_cache_enable() )
        MyOtherCache::clear_all();
}
add_action('ccfm_clear_cache_for_me', 'my_other_cache_clear');

Capturas

  • El botón del escritorio.

Reseñas

14 de enero de 2023
It works exactly the way I need, mainly cleaning browser cache. Thank you so much!! ❤️
12 de junio de 2022 1 respuesta
This is a powerful plugin that is more powerful than any other plugin to delete cache very quickly without going back to Cloudflare... Really, thank you
17 de febrero de 2022
I don't know why this is not included with every cache plugin already? to delete cache whenever something is saved on WordPress backend.
Leer todas las 27 reseñas

Colaboradores y desarrolladores

«Clear Cache for Me» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

Traduce «Clear Cache for Me» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

2.1.1

Fixed «Edit with Elementor» in toolbar not working.
Fixed settings page so «WP Optimize» shows correctly when being used.

2.1

Added CSS cache clearing for Elementor. (thanks to @ronr1999!)

2.0.1

Fixed WP Rocket cache clearing. (thanks to @deargeek!)

2.0

Added cache clearing for additional plugins that save their own cache.
Added cache clearing for WP Rocket.
Organized code.

1.8

Updated cache clearing for LiteSpeed Cache.

1.7

Added cache clearing when fields in Advanced Custom Fields are updated.

1.6

Added cache clearing when WordPress core is updated.
Added cache clearing when plugins are activated, deactivated, and updated.
Added cache clearing support for Insert Headers and Footers plugin.
Fixed admin-bar loading when admin bar is not present.

1.5.1

Remove ajax from admin bar when jQuery is not available.

1.5

Updated admin bar link to clear cache in place.
Added cache clearing support for Cache Enabler.
Fixed cache clearing for Breeze.

1.4.1

Updated Clear Cache For Me button in admin bar.
Updated clearing WP Fastest Cache to include clearing minified cache.
(thanks to Ov3rfly)

1.4

Added cache clearing for LiteSpeed Cache.
Added cache clearing for SiteGround SuperCacher.
Added cache clearing for Autoptimize.
Added Clear Cache For Me button in admin bar.
Added Development Mode to always load a fresh copy of javascript and stylesheet files.

1.3

Added cache clearing for Breeze cache.
Added cache clearing when WP Forms is saved
Added cache clearing when WooCommerce settings are saved.
Moved the settings to its own page under Settings.
Fixed cache clearing for GoDaddy so all pages are cleared.

1.2

Added cache clearing for WP Optimize cache.

1.1.1

removed hosting notice, fixed js error.

1.1

Added cache clearing for Kinsta hosting.
Added cache clearing for GoDaddy manged hosting.
Added cache clearing for Formidable Forms.

1.0

Added clearing cache for all JS and CSS theme files.
Added clearing cache when Qode theme options are saved.

0.93

Fixed button not showing up when admin doesn’t have permissions. Button will now always show for the admin user with manage_options capability.

0.92

Fixed clearing cache on widgets when widgets are saved or reordered.

0.91

Minor fix checking if certain WPEngine functions exist. Thanks to @tharmann!

0.9

Added clear cache for NextGen Gallery saving, but not sure if all actions are accounted for.

0.8

Added clear cache for WooThemes options.
Fixed cache not clearing on some WP Super Cache installations.

0.7.1

Added clear cache for settings pages.
Added clear cache for Contact Form 7 form saving.
Updated description and added donation link on plugin page only.

0.6.2

minor updates to css class names

0.6.1

Updated German translation (thanks to Ov3rfly!).
Updated admin HTML and styles (thanks to Ov3rfly!).

0.6

Fixed cache not clearing when widgets are re-ordered or deleted (thanks to Ov3rfly!).
Added optional instructions to be shown above the button (thanks to Ov3rfly!).
Added to and updated German translations (thanks to Ov3rfly!).
Added more security checks. (thanks to Ov3rfly!).
Added customize theme detection. Clears cache when customizing theme.
Reorganized code a bit.

0.5

Added German language translation (thanks to Ov3rfly)
Added hooks for 3rd party code.

0.4

Bug fixed: Fixed cache not clearing when updating nav menu. (thanks to Ov3rfly for catching this and supplying the fix)

0.3

Added clear caching for menus
Added clear cache button to dashboard
Added option to set what capability is needed to view the clear cache button for admins.

0.2

Removed garbage at the end of the plugin url.

0.1

Versión inicial.