You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
When using Kirby pages as comments it could be performance heavy to show the latest 10 comments on the startpage for example. Not at first but when having 1000+ comments.
Is there some kind of comment cache? Else I have an idea for it. When a comment is created also generate a file that contains the 10 latest comments, or the urls to these.
The text was updated successfully, but these errors were encountered:
about
comments
hello-about
bye-about
projects
comments
hi-projects
goodbye-projects
Then for the latest comments do something like this:
$site->getLatestComments(3);
The result on the startpage (home) will be this:
hello-about
hi-projects
bye-about
To get the 3 latest comments like this it needs to go through every page and every comment to see which comments are the latest ones.
But by using a panel hook, it can update an array/json/yaml file with data and there store the most recent comments.
If it's not a good idea to have built in, it would be possible to have as an external plugin as well, like KirbyRecentComments. A plugin for the plugin. I would probably write it if you don't. :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using Kirby pages as comments it could be performance heavy to show the latest 10 comments on the startpage for example. Not at first but when having 1000+ comments.
Is there some kind of comment cache? Else I have an idea for it. When a comment is created also generate a file that contains the 10 latest comments, or the urls to these.
The text was updated successfully, but these errors were encountered: