The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to Bypass Cachi...
 
Share:
Notifications
Clear all

[Solved] How to Bypass Caching (wpDiscuz Comments Section Only)

12 Posts
3 Users
1 Reactions
4,933 Views
Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

Hi there,

Numerous websites use various caching plugins (e.g., WP Rocket, Fast Velocity Minify, etc.) and CDNs (e.g., KeyCDN, Cloudflare, etc.) for caching and delivering a faster website.

Unfortunately, the caching of pages using wpDiscuz are creating problems such as comments, article ratings, and votings not displaying until cache is cleared.

How can we fix this? Which wpDiscuz files should be bypassed by these plugins and CDNs - OR - can you provide a "no-cache" filter (i.e., php snippet) that will accomplish the same? The filter approach would be best, if possible.

It makes no sense to bypass cache for the entire page using wpDiscuz.

By the way, your plugin rocks and do appreciate the support both you and your team provide to all of us.

Thank you!

-------------------------

Reference: (these examples do not provide a solution to this GLOBAL issue)

https://wordpress.org/support/topic/wp-discuz-conflict-with-wp-rocket/

https://wordpress.org/support/topic/error-firefox-wpdiscuz-5-1-0-version/

 

11 Replies
Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

@asti,

Just found an article that addresses the same problem but for Gravity Forms. This article may help you (and the community) come up with a solution.

Again, thank you.

Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

@asti,

Any updates on this? We would appreciate a cache-busting snippet so we don't have to bypass caching the entire contents of the page using your plugin. 

Thank you!

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@aerostar,

Currently, wpDiscuz doesn't have any issues with cache plugins. It works fine with almost all cache plugins, like WP Rocket, Fast Velocity Minify, etc. 

In your case, the issue comes from the SG Optimizer plugin. We've not found the solution in this case. Probably if you contact the SG Optimizer plugin support they'll better find the solution and solve the issue. 

Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

@asti,

Thank you. We have reached out to SiteGround. Waiting for their reply.

Would be great if you did the same (as a developer). 

Also, it would be great if you can provide a cache-busting code as requested above. Gravity Forms developed one for their forms, I'm sure you guys can too.

We are still having issues with WP Rocket and SG Optimizer. Your plugin needs to kill caching from any and all cache plugins.

What are the ideal WP Rocket settings for wpDiscuz? At this time, we can add comments, but we cannot delete them without refreshing cache (manually).

Cheers!

Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

@asti,

Any udpates? As stated before, please provide the settings required for WP Rocket, SG Optimizer, and Cloudflare.

It would be best if you can provide a cache-busting code (snippet) similar to the one developed by Gravity Forms.

Comments added via your plugin shouldn't be cached at all. No need to penalize the rest of our blog or news pages due to your plugin.

If helpful, we can provide another staging site so you can verify our findings.

Thank you!

 

 

1 Reply
Tom
 Tom
Support
(@tomson)
Joined: 9 years ago

Honorable Member
Posts: 506

@aerostar,

I'm sorry, but we have no update for this yet. This is not an easy task and this is too hard to fix from wpDiscuz side. We have to learn all functions and the whole API of WP Rocket and SG Optimizer plugins to be able to stop them.

Even if we learn all functions I don't think they have all necessary tools in plugins to allow us exclude wpDiscuz functions or disable caching. So it's hard to say when and how this issue can be fixed. We have no idea yet. And I have nothing to promise you at this time.

Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

@tom, @asti

Thank you for your transparency and honesty.

Well, good news anyway!

After performing many tests, we have found a solution to this caching issue. The solution applies to wpDiscuz customers that use the Avada Theme and the following caching plugins or clients: WP Rocket, SG Optimizer, and Cloudflare.

We will post the solution (i.e., procedure) on your WordPress plugin forum.

Hopefully, once you verify the procedure, you can "pin" the procedure so others can find it quickly and solve their own comments caching issues. Also, it would be helpful to add it to your knowledgebase.

Cheers!

1 Reply
Tom
 Tom
Support
(@tomson)
Joined: 9 years ago

Honorable Member
Posts: 506

Ok, thank you @aerostar,

BTW, the cache issue related to the "comment deleting" has a chance to be fixed in near future.

Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

How to Bypass Caching of wpDiscuz Comments (Procedure)

 

Dear Community,

If you're having issues with comments not showing up on your Blog or News page(s) due to caching plugins, worry no more.

We have developed a workaround (i.e., procedure) that will allow you to cache your Blog or News pages minus the comments section of affected pages. The procedure (provided below) applies to those using the following host, theme, plugins, and CDN:

- SiteGround (Host)
- Avada (Theme)
- SG Optimizer (Caching Plugin)
- WP Rocket (Caching Plugin)
- Cloudflare (CDN)

Procedure:

(1) SiteGround: No special code or set-up needed.

(2) Avada: No special code or set-up needed.

(3) SG Optimizer:

(a) Go to WP Dashboard > SG Optimizer > SuperCacher Settings > Excluding URLs (Details: http://prntscr.com/vg4uj5)

(b) Add the URL sub-domain defined for the individual posts in your website. It is imperative that you use the proper wildcard (*) and slashes (/) for your affected posts (pages). For example, if your individual blog URLs (permalinks) have the format https://www.mywebsite.com/blog/mywebsiteblogpost/, then use the following exclusion URL format: https://www.mywebsite/blog/*/

(4) WP Rocket:

(a) Go to WP Dashboard > Settings > WP Rocket > Advanced Rules > Always Purge URL(s) (Details: http://prntscr.com/vg5amv)

(b) Add the same URL(s) you added to SG Optimizer as noted in Step (3)(b) above. Please Note: WP Rocket uses a different wildcard format. Also, there is no need to exclude your News or Blog URL(s) in WP Rocket. wpOptimizer automatically recognizes WP Rocket (except as noted here).

(5) Cloudflare:

(a) Go to Cloudflare > Dashboard > Page Rules > Create Page Rule (Details: http://prntscr.com/vg5owg)

(b) Set up a Page Rule for your affected Blog and/or News pages using the same URL(s) you added to SG Optimizer in Step (3)(b) with the following Cloudflare Page Rule settings: (Details: http://prntscr.com/vg61jt)

Always Online: On
Security Level: Medium
Cache Level: Standard

(Important: Do not use "Cache Everything" for the affected URL(s). Otherwise, this entire procedure will not work)

(6) Purge all cache in the following sequence (wait one minute after clearing cache for each item): Theme, WP Rocket, SG Optimizer, Cloudflare, Browser

(7) Go back to your affected Blog or News post, enter a test comment, and verify the above works.

We welcome any comments or recommendations that will help improve the above procedure.

Cheers!

1 Reply
(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

Special Note:

If you still do not see comments displayed on your affected pages after following the above procedure, please check your wpDiscuz General Settings and make sure "Use WordPress native AJAX functions" is ON. Click here for details.

Cheers!

Page 1 / 2
Share: