Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purge forum index #126

Closed
Paike opened this issue Sep 13, 2016 · 1 comment
Closed

Purge forum index #126

Paike opened this issue Sep 13, 2016 · 1 comment

Comments

@Paike
Copy link

Paike commented Sep 13, 2016

I tried to purge the forum index on topic change. It works when a topic post is deleted. I found the forum ID in the post's meta. But this is empty, when the post is just published / when Nginx Helper hooks.

    $topic_meta = get_post_meta($_post_ID);

    $str_meta = print_r($topic_meta, true);
    $this->log('Meta: '.$str_meta);
    $_forum_ID = $topic_meta['_bbp_forum_id'][0];
    $this->log('Post ID: ' .$_post_ID);
    $this->log('Forum ID: ' .$_forum_ID);
    $_purge_forum = true;

    if( $_purge_forum) {
        $this->log( "Purging forum index (topic id $_post_ID, forum id $_forum_ID)" );
        $this->purgeUrl( get_permalink( $_forum_ID ) );
    }
// purger.php:120 _purge_by_options()

Someone has an idea? The forum index states how many topics and posts exist in the forum, and when the last update was made.

Another option would be to prevent caching of forum index. But maybe purging can be made possible.

@mrrobot47
Copy link
Member

Please use Custom Purge URL option from backend settings.
Add the forum index page(s) URL(s) in that, so if any topics are published/updated, then the forum index page will also get purged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants