Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Emre Vona

    (@emrevona)

    The caches are deleted when the comment is approved.

    Hi,

    i have a problem with that, i understand that the cache is deleted when the comment is approved, but i can see that if I answer a comment the cache is not deleted.

    That is because there are comments that don´t need to be approved, they are automatically approved.

    I am also seeing the issue with the cache NOT being deleted when a comment does not need to be approved. This happens for my own comments, and for comments that for known people who already have an approved comment.

    This is a related issue from the plugin author, where someone else posted their solution.

    After reading it, I modified my version of WP Fastest Cache to check for approved comments on the hook “comment_post” through an additional function.

    (1)
    wpFastestCache.php::detectNewPost() added this line at end of function:

    add_action('comment_post',array($this,'approvedDeleteCache'),10,2);

    (2)
    Then I added this function right below it:

    public function approvedDeleteCache ($comment_id, $status) {
        if ($status==1) $this->singleDeleteCache($comment_id);
    }

    The comment_post hook is run everytime a comment is written to the database, but the status check hopefully keeps the number of cache deletes to a minimum without blowing up from processing spam comments, which was the plugin author’s concern.

    I guess I will find out if that’s the case or not! Fingers crossed for luck!

    Plugin Author Emre Vona

    (@emrevona)

    I got the problem. I will fix and inform you. thank you so much.

    Thank u!!!!! I will wait

    Plugin Author Emre Vona

    (@emrevona)

    Hi @civittas and @daveseah again, I have implemented what you wanted 🙂

    – Delete the plugin
    – download and setup again

    can you inform me after testing please?

    Plugin Author Emre Vona

    (@emrevona)

    I am still waiting for your answers 🙂

    Hey Emre,

    I just tested it, and it appears to work for me leaving comments as an admin. Thanks for taking the time to add the feature!

    Plugin Author Emre Vona

    (@emrevona)

    your welcome 🙂 Can you vote me if you like?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Refresh cached pages when comments are created’ is closed to new replies.