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

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Solved] Keep cache when comments added?

9 Posts
2 Users
3 Reactions
669 Views
Posts: 124
Topic starter
(@danniee)
Estimable Member
Joined: 5 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: 124
Topic starter
(@danniee)
Estimable Member
Joined: 5 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: 8 years ago

Illustrious Member
Posts: 8075

@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: 5 years ago

Estimable Member
Posts: 124

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

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

Illustrious Member
Posts: 8075

@danniee,

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

Posts: 124
Topic starter
(@danniee)
Estimable Member
Joined: 5 years ago

Got it. Appreciate the help.

Posts: 124
Topic starter
(@danniee)
Estimable Member
Joined: 5 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: 8 years ago

Illustrious Member
Posts: 8075

@danniee,

Yes, it's expected behaviour. 

(@danniee)
Joined: 5 years ago

Estimable Member
Posts: 124

@asti thank you. All I needed to know 🙂

Share: