|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
//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();
|
|
|
|
}
|
|
|
|
````` |
|
|
|
\ No newline at end of file |