Home

Conversation

$$15848
https://cosocial.ca/users/evan posted on Mar 22, 2026 03:50
In reply to: https://activitypub.space/post/1637

@julian that's the way to do reverse chron that messes with caches!

Instead, number your pages from oldest to newest. So page 1 was the first page created. After PAGE_SIZE items have been added, create page 2, make it the `first` page, and now page 1 never changes (unless one of its items gets `Remove`d). All your volatility is in the most recent page, and older pages rarely change.

You can also use UUIDs or other IDs for pages.

https://cosocial.ca/users/evan/statuses/116270786356331178
Reply
$$15851
https://cosocial.ca/users/evan posted on Mar 22, 2026 03:54
In reply to: https://cosocial.ca/users/evan/statuses/116270786356331178

@julian the downside is that your `first` page is rarely full. You can get around this by having the `first` page be up to 2 * PAGE_SIZE in length, and shifting PAGE_SIZE items to a new page when the `first` page hits its max.

https://cosocial.ca/users/evan/statuses/116270803084544007
Reply