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

Last edited by Jonatan Machado Mar 27, 2019
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Redis

Adicionei uma nova funçao para limpar o cache cada vez que roda essas funçoes do w3 total cache iso pode ser adicionado em qualquer site que usa wordpres com o redis + w3 total cache

Pode ser adicionado no functions.php de qualquer tema

//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' );
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