Plugin Support
qtwrk
(@qtwrk)
Hi,
When you set up the Wp foro , it will have a base URL , default as “community”
Please try add this string into no-cache URI and see how it goes.
Best regards,
Thread Starter
bba01
(@bba01)
Hi and thanks for answering! I’m using woforo as my front page and that would slow down my site considerably. Is there another way of doing it? With best regards, bb
Hi @bba01, you can still keep it cache and add hook with wpforo to purge the cache by function. Here’s an example:
if ( $_SERVER[ 'REQUEST_URI' ] === '/community') {
if ( ! method_exists( 'LiteSpeed_Cache_API', 'tag_add' ) return ;
LiteSpeed_Cache_API::tag_add( 'wpforo_community_page' ) ;
}
add_filter('wpforo_after_add_topic', 'purge_page_on_new_topic') ;
function purge_page_on_new_topic( $id ) {
if ( ! method_exists( 'LiteSpeed_Cache_API', 'purge' ) return ;
LiteSpeed_Cache_API::purge( [ "wpforo_community_page" ] ) ;
}
(The confirm the REQUEST_URI is correct on your home page request)
According to wpforo documentation, here’s the hook you may able to use:
'wpforo_after_add_topic' - arg: (array)$topic
'wpforo_start_edit_topic' - arg: (array)$topic
'wpforo_after_add_post' - args: (array)$post, (array)$topic
'wpforo_start_edit_post' - args: (array)$post
Thread Starter
bba01
(@bba01)
Hi @stanleylitespeed !
I’m not a coder but so forgive me for my question. Does that code purge the entire mysite.com/forum cache every time someone posts or replies? If yes, isn’t there any way of only purging that particular forum thread from the cache?
With best regards,
bb
The above code will add a tag to the home page(/community) and it just purges the home page cache when every time someone posts or replies.
Thread Starter
bba01
(@bba01)
@stanleylitespeed
Hi and thanks for answering!
My site structure is like this: http://www.mysite.com/forum/
In WordPress I’ve made the /forum/ page the site front page.
So http://www.mysite.com shows my forum.
My problem is also that when someone updates a post in http://www.mysite.com/forum/avtal/blekinge/ (for example) the update isn’t seen directly…
Is there a way of adding a code so that ONLY that exact forum part that receives a new post or and update is also updated in the cache/purged from the cache?
With best regards,
bb