The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] Keep cache when comments added?
How-to and Troubleshooting
(@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
(@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?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8188
Jun 15, 2023 8:01 am
(@danniee)
Joined: 5 years ago
Estimable Member
Posts: 124
Jun 15, 2023 8:46 am
@asti thank you. What does this hook do? It's not really explained in that article.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8188
Jun 15, 2023 10:11 am
@danniee,
Using this hook you can enable or disable the wpDiscuz caching functions.Â
(@danniee)
Estimable Member
Joined: 5 years ago
Got it. Appreciate the help.
(@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?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8188
Jun 17, 2023 12:40 pm
@danniee,
Yes, it's expected behaviour.Â
(@danniee)
Joined: 5 years ago
Estimable Member
Posts: 124
Jun 17, 2023 1:56 pm
@asti thank you. All I needed to know 🙂