Notifications
Clear all

wpForo 1.x.x [Solved] Cache hook development questions

6 Posts
2 Users
3 Likes
2,443 Views
Posts: 3
Topic starter
(@litespeeddev)
Active Member
Joined: 7 years ago

Hi WPFORO,

I am from LiteSpeed cache. When I develop the WPForo third party plugin to make WPForo work better with LiteSpeed WordPress cache plugin , I got a question. If anyone can tell it will be great appreciated.

1. Is there any particular reason that WPForo don't have a `wpforo_after_edit_topic` action hook? Looks like this is the only one that is missing in your topic&post operation hooks.

2. WPForo called `wpforo_clean_cache()` in all operations. That is a good job. However, there is no hook in that function. That means, it's hard to do our magic there.

3. Also in function `wpforo_clean_cache()`, it informs WP to only clear the main forum homepage page cache. While full page cache plugins will cache the forum and topic and post too, if it can provide all affected pages with their ids, it will be great. e.g. when add a post, the ideal data is `related topic id`, `related forum id`, `related parent forums & category id (in breadcrumb)`.

After we finish developing the compatibility to make WPForo work better with our cache plugin, we will add it to our supported plugin list.

BTW, WPForo is a excellent plugin. You guys did a good job. It has a well organized program files and nice programming styling, and one of the most important point is, a good data structure.

5 Replies
Robert
Posts: 10506
Admin
(@robert)
Support Team
Joined: 8 years ago

Thank you litespeed

Please find my answers below:

1. Is there any particular reason that WPForo don't have a `wpforo_after_edit_topic` action hook? Looks like this is the only one that is missing in your topic&post operation hooks.

We'll add this in next 1.2.1 release.

2. WPForo called `wpforo_clean_cache()` in all operations. That is a good job. However, there is no hook in that function. That means, it's hard to do our magic there.

This function is not complete, it's under development. Please wait for the next release, we're improving it...

3. Also in function `wpforo_clean_cache()`, it informs WP to only clear the main forum homepage page cache. While full page cache plugins will cache the forum and topic and post too, if it can provide all affected pages with their ids, it will be great. e.g. when add a post, the ideal data is `related topic id`, `related forum id`, `related parent forums & category id (in breadcrumb)`.

Sure we'll add array variables of all major objects like forum, topic, post, user, etc...

Posts: 3
Topic starter
(@litespeeddev)
Active Member
Joined: 7 years ago

Can this topic be moved to Q&A Layout How-to and Troubleshooting ? Thanks. 

Robert
Posts: 10506
Admin
(@robert)
Support Team
Joined: 8 years ago

This topic doesn't have any relation to Q&A Layout How-to and Troubleshooting forum. Please read forum descriptions. Q&A Layout How-to and Troubleshooting forum is only for Q&A Forum Layout related issues and questions. Each layout has it's own forum. But the general How-to and Troubleshooting forum is this one.

Posts: 3
Topic starter
(@litespeeddev)
Active Member
Joined: 7 years ago

If possible, please add hooks to `post->status()` and `topic->status()` too. Currently when approve post, no cache purged.

Page 1 / 2