add /comments/latest route #317
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This page will be useful for moderators to retrieve latest comments.
The limit is based on current date to limit number of comments retrieved
from the database. Only comments from the last 7 days will be available.
As it's the first page to index all comments with criteria only made on
created_at property, I added an index to the comments sql table.
As LinuxFr has between 1500 to 2000 comments each 15 days, I've decided
to paginate to 50 comments. As the number of comments in the atom feed is
linked to this pagination setting, I wanted it to be big enough so RSS readers
can take all comments with around 4 requests by day.
More on suivi request.