I am building a Laravel rest API that will return a list of posts by categories in chunks with $skip and $take.
i.e. /posts/animals/0/10
The problem here is that the posts are ordered by date desc so the new posts will be first and if a device has already asked for page 2 for example this could lead to the problem of getting the same item in different pages.
I can think of some checks to implement both on api and device side but they are all memory consuming. I thought of having a list of post_ids and checking against those before rendering the feed (device side) or doing the same thing with some cache list on the API side.
Is there a better way to accomplish this? Does someone have an article on best practices for feeds / streams?
Thanks in advance!