I am using wordpress total cache, and i need to clear cache every time a comment is added or modified


i found this method but , i don't know when to call it ( how to get when a comment is posted/updated )


You would better to contact plugin author, because this is for more general wordpress stuff.

In general, you can clear your cache when comment is added.

There is comment_post hook. This hook will be run when the comment is submitted. To see Reference

  • where can i find the comment_post hook ? is it in theme's function file ? – AYMEN SOUMER Sep 10 '19 at 14:03
  • It's wp-core filter. You can use the hook in functions.php in your theme. – idpokute Sep 10 '19 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.