Skip to:
Content
Pages
Categories
Search
Top
Bottom

Memcached and deleting comments


  • shpitzyl
    Participant

    @shpitzyl

    Hello,
    When deleting comments on activity page, the comments won’t disappear until flushing the cache. This issue happens only with comments. Activity updates are fine. Any idea why it is happening and how to fix it?

Viewing 1 replies (of 1 total)

  • shpitzyl
    Participant

    @shpitzyl

    Found a solution. The function bp_activity_delete_comment doesn’t clear the cache. If someone here uses memcached put this code in your function.php

    function wtrp_comment_delete_cache( $activity_id, $comment_id ){
      wp_cache_delete( $activity_id, 'bp_activity_comments' );
    }
    
    add_action( 'bp_activity_delete_comment', 'wtrp_comment_delete_cache' );
Viewing 1 replies (of 1 total)
  • The topic ‘Memcached and deleting comments’ is closed to new replies.
Skip to toolbar