The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Keep cache when com...
 
Share:
Notifications
Clear all

[Solved] Keep cache when comments added?

9 Posts
2 Users
3 Reactions
481 Views
Posts: 116
Topic starter
(@danniee)
Estimable Member
Joined: 4 years ago

Hi guys,

Β 

Is there a way that you know of to keep the site cached when new comments are added? It's a bit frustrating to see cache flushed whenever someone comments, which happens a lot.

I am just curious if you know of any workarounds? Maybe load comments dynamically through JavaScript after the cached page has loaded, or something like that?

Best regards

8 Replies
Posts: 116
Topic starter
(@danniee)
Estimable Member
Joined: 4 years ago

Cache is set to be cleared only on posts where comments are made/liked plus the index page, right?

3 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7721

@danniee,

Try to use the wpdiscuz_manage_all_cache_clearing hook. More info here: https://wpdiscuz.com/docs/codex/filters/wpdiscuz_manage_all_cache_clearing/

(@danniee)
Joined: 4 years ago

Estimable Member
Posts: 116

@asti thank you. What does this hook do? It's not really explained in that article.

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

Illustrious Member
Posts: 7721

@danniee,

Using this hook you can enable or disable the wpDiscuz caching functions.Β 

Posts: 116
Topic starter
(@danniee)
Estimable Member
Joined: 4 years ago

Got it. Appreciate the help.

Posts: 116
Topic starter
(@danniee)
Estimable Member
Joined: 4 years ago

Another question guys. Is it normal for cache to be flushed for the index page whenever someone likes a comment? Seems a bit unnecessary, but maybe it's expected behavior?

2 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7721

@danniee,

Yes, it's expected behaviour.Β 

(@danniee)
Joined: 4 years ago

Estimable Member
Posts: 116

@asti thank you. All I needed to know πŸ™‚

Share: