plugin-icon

Clear Cache for Me

Vacía toda las caché en WPEngine, W3 Total Cache, WP Super Cache, WP Fastest Cache al actualizar widgets, menús, ajustes. Fuerza al navegador a recargar el CSS …
Calificaciones
4.8
Última actualización
January 21, 2024
Versión
2.1.1
Instalaciones activas
40K

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');
Instalaciones activas
40K
Probado hasta
6.4.4
Te puedes descargar este plugin para utilizarlo en tu instalación autoalojada de WordPress.