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
Show whitespace changes
Inline Side-by-side
Showing with 12 additions and 11 deletions
+12 -11
  • Servidores/Redis.md Servidores/Redis.md +12 -11
  • No files found.
Servidores/Redis.md
View page @ 5298ea30
......@@ -4,9 +4,8 @@ Adicionei uma nova funçao para limpar o cache cada vez que roda essas funçoes
```
require_once(ABSPATH . '/wp-admin/includes/plugin.php');
// Verifica se o plugin w3-total-cache está ativado.
if (is_plugin_active('w3-total-cache/w3-total-cache.php')) {
function check_plugin_w3tc_state(){
if (is_plugin_active('w3-total-cache/w3-total-cache.php')){
//Limpa todo o cache do redis qundo faz algumas dessas açoes 'save, delete, trash'
add_action( 'save_post', 'flush_redis_save_post' );
add_action( 'delete_post', 'flush_redis_save_post' );
......@@ -15,7 +14,9 @@ if (is_plugin_active('w3-total-cache/w3-total-cache.php')) {
{
w3tc_flush_all();
}
}
}
add_action('admin_init', 'check_plugin_w3tc_state');
`````
......
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