Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
W Wiki
  • Project overview
    • Project overview
    • Details
    • Activity
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
Collapse sidebar
  • Tutoriais
  • Wiki
  • Wiki
    • Servidores
  • Redis

Redis · Changes

Page history
Update Redis authored Mar 27, 2019 by Jonatan Machado's avatar Jonatan Machado
Hide whitespace changes
Inline Side-by-side
Showing with 11 additions and 7 deletions
+11 -7
  • Servidores/Redis.md Servidores/Redis.md +11 -7
  • No files found.
Servidores/Redis.md
View page @ c3712367
...@@ -4,13 +4,17 @@ Adicionei uma nova funçao para limpar o cache cada vez que roda essas funçoes ...@@ -4,13 +4,17 @@ Adicionei uma nova funçao para limpar o cache cada vez que roda essas funçoes
``` ```
//Limpa todo o cache do redis qundo faz algumas dessas açoes 'save, delete, trash' require_once(ABSPATH . '/wp-admin/includes/plugin.php');
add_action( 'save_post', 'flush_redis_save_post' ); // Verifica se o plugin w3-total-cache está ativado.
add_action( 'delete_post', 'flush_redis_save_post' ); if (is_plugin_active('w3-total-cache/w3-total-cache.php')) {
add_action( 'trash_post', 'flush_redis_save_post' ); //Limpa todo o cache do redis qundo faz algumas dessas açoes 'save, delete, trash'
function flush_redis_save_post() add_action( 'save_post', 'flush_redis_save_post' );
{ add_action( 'delete_post', 'flush_redis_save_post' );
w3tc_flush_all(); add_action( 'trash_post', 'flush_redis_save_post' );
function flush_redis_save_post()
{
w3tc_flush_all();
}
} }
````` `````
......
Clone repository
  • Gitlab
    • Comandos
  • Hotfix
    • og:image
  • Magento
    • Htaccess
    • MagentoCronChecker
    • Robots
    • SimpleSchema
    • Soap v2 Tester
    • gitignore
  • Migração
    • leg.br
  • Padrões
    • eslint
    • prettier
  • Plugins
    • Adicionar informações extras ao texto copiado da web
  • QueryCommerce
  • Servidores
    • Cloudways
    • DnsMadeEasy
View All Pages