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

Fix caching support for bbPress #168

Closed
raamdev opened this issue May 21, 2014 · 14 comments
Closed

Fix caching support for bbPress #168

raamdev opened this issue May 21, 2014 · 14 comments
Assignees
Milestone

Comments

@raamdev
Copy link
Contributor

@raamdev raamdev commented May 21, 2014

As of v140520-RC, Quick Cache caches pages related to bbPress, but does not purge cache files related to bbPress when certain events take place (such as the creation of a new Forum).

Quick Cache needs to be updated to properly support bbPress.

Reported here: http://wordpress.org/support/topic/bbpress-new-replies-doesnt-auto-purging-cache

@raamdev raamdev added this to the Future Release milestone May 21, 2014
@raamdev raamdev added enhancement and removed enhancement labels May 21, 2014
@raamdev raamdev changed the title Add support for bbPress Fix support for bbPress May 21, 2014
@raamdev raamdev changed the title Fix support for bbPress Fix caching support for bbPress May 21, 2014
@jaswrks
Copy link

@jaswrks jaswrks commented Jun 17, 2014

Just thinking this through with you...

A new bbPress Forum is a new Post with the Custom Post Type: forum; so creating a new Post (of any kind) could somehow warrant a cache purge maybe?

Hmm, it seems to me that in practice, if I create a new Forum I will most likely just clear the cache manually. I think for most sites creating a new Forum is something that is generally done during the initial site configuration, or during a larger restructuring of the site/community.


The person in that ticket writes...

unfortunately when a new reply posted in bbpress, auto-purging doesn't run and only shown to logged in users. how can i fix it? or how can i bring out bbpress from quick cache?

That makes me think they are allowing anonymous forum submissions; i.e. from users who are not logged into the site. The only way I know to combat this issue, is for us to try to pick up this scenario in the is_like_logged_in_user() method.

@raamdev raamdev modified the milestones: Future Release, Next Release Jun 17, 2014
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Jun 17, 2014

@jaswsinc Thanks for your thoughts! I left a reply on the original forum post asking if they're allowing submissions from users who are not logged in.

That said, if someone is logged in and posts a new reply, does that trigger a purge of the cache for that topic? It should, otherwise visitors (who are not logged in) wouldn't see the new reply from the logged-in user.

I haven't looked at the code yet to check this, but I'm noting my thoughts here for when I come back to this.

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Jun 17, 2014

Punting this to the Future Release milestone.

@jaswrks
Copy link

@jaswrks jaswrks commented Jun 17, 2014

That said, if someone is logged in and posts a new reply, does that trigger a purge of the cache for that topic? It should, otherwise visitors (who are not logged in) wouldn't see the new reply from the logged-in user.

If user-specific caching is off, then none of this is cached for those logged-in users. The public facing version of the forum topic will remain cached and only show topics/replies since it was last cached.

If user-specific caching is on, and a user does a POST of any kind, it wipes the cache for that user.


I agree, there is more work to be done to get this working perfectly w/ bbPress.

@raamdev raamdev removed this from the Next Release milestone Aug 4, 2014
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented May 12, 2015

Also reported here:


@jaswsinc writes...

If user-specific caching is on, and a user does a POST of any kind, it wipes the cache for that user.

It wipes the cache for that user (the one doing the POST), but not for any other users. So that means if logged-in user creates a new Topic, other logged-in users will not see that new topic until they logout and then back in (at which point their user cache will be cleared). Until that time (or until the entire cache is cleared automatically or manually), other logged-in users will be seeing stale versions of the site--newly created topics or comments made by other logged-in users (or for that matter, anonymous users) will never be seen until the user's cache is cleared.

What needs to happen to improve bbPress support:

When a new Forum is created

  • Clear the cache for the Forums index (e.g., /forums.html)
  • Clear the cache for all user caches for the Forums index (e.g., forums.u/*.html)

When a new Topic is created in a Forum

  • Clear the cache for that Forum index (e.g., /forums/forum/example-forum.html)
  • Clear the cache for all user caches for that Forum index (e.g., /forums/forum/example-forum.u/*.html)

When a new reply to a Topic is created

  • Clear the cache for that Topic (e.g., /forums/topic/example-topic.html)
  • Clear the cache for all user caches for that Topic (e.g., /forums/topic/example-topic.u/*.html)

@jaswsinc does that look right to you?

@raamdev raamdev added this to the Future Release milestone May 12, 2015
@xberg
Copy link

@xberg xberg commented May 19, 2015

Hi,
I am having exactly the same issue with SimplePress (a competing WP forum plugin) and would expect the same solution. I am not too concerned about the first point, ie "when a new forum is created" as this happens once every blue moon and admin can easily clear the cache at that point. But the others happen all the time.

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented May 20, 2015

@xberg Thank you for chiming in. We'll be sure to look into SimplePress compatibility when working on this issue.

@jaswrks
Copy link

@jaswrks jaswrks commented Jun 3, 2015

@jaswsinc does that look right to you?

Excellent, yes! That should do the trick.

@raamdev raamdev modified the milestones: Next Release (Pro), Future Release Jul 10, 2015
@raamdev raamdev modified the milestones: Next Release (Lite), Next Release (Pro) Jul 27, 2015
@jaswrks jaswrks self-assigned this Jul 28, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Jul 28, 2015
@jaswrks
Copy link

@jaswrks jaswrks commented Jul 28, 2015

This has been resolved in my dev branch: feature/jaswsinc. I'll submit a PR soon.

@jaswrks
Copy link

@jaswrks jaswrks commented Jul 28, 2015

Line that fixes this issue: wpsharks/comet-cache-pro@1b25d07#diff-a5f584d3f31b9aff3ad43f0137497d98R103

The rest of the changes were an overall improvement and bbPress compat. enhancements.

@xberg
Copy link

@xberg xberg commented Jul 29, 2015

Good news for bbpress.
Is there anything I can document to make this happen with Simple Press as well?

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Jul 29, 2015

@xberg I have opened a separate GitHub issue for investigating Simple:Press compatibility; see #534. If you'd like to help out, please see my notes on that GitHub issue and leave follow-up comments related to Simple:Press over there. :-) Thanks!

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Aug 11, 2015

Next Pro Release Changelog:

  • bbPress Compatibility: This release greatly improves compatibility with bbPress. Events like creating a new Forum, creating a new Topic, and posting a reply to a Topic (including threaded replies), now properly clear the necessary cache files to ensure that cached bbPress pages remain up-to-date. See Issue #168.
@raamdev raamdev added the DMOZL label Aug 12, 2015
@raamdev raamdev modified the milestones: Next Release (Lite), Next Release (Pro) Aug 12, 2015
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Aug 21, 2015

ZenCache Pro v150821 has been released and includes changes from this GitHub Issue.

See the ZenCache Pro v150821 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#168).

@raamdev raamdev closed this Aug 21, 2015
@wpsharks wpsharks locked and limited conversation to collaborators Aug 21, 2015
@raamdev raamdev modified the milestones: v150821 (Pro), Next Release (Lite) Aug 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants