Skip to content

feat(api): keep collection entries in memory until the branch moves - #57

Merged
ermos merged 1 commit into
mainfrom
feat/entries-cache
Oct 15, 2026
Merged

ermos merged 1 commit into
mainfrom
feat/entries-cache

Conversation

@ermos

@ermos ermos commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • listEntries keeps the read collection in memory, per site and collection.
  • The cache key is the head sha of the site branch, the collection settings and the open drafts (number, branch, updated_at). A list costs two light calls (pulls and branch head) instead of reading every file, which matters most on GitLab and Forgejo / Gitea (one call per entry).
  • Any commit (from Sumigo or a direct push) or draft update invalidates it on the next list, no TTL.
  • Draft schedules come from the database, so drafts are re-attached to the fresh pulls of each request.
  • README, introduction and forges guide describe the cache.

Tests

  • TestEntriesAreCachedUntilTheBranchMoves: a second list does not read the forge, a moved branch does.

@ermos
ermos merged commit f449a4e into main Oct 15, 2026
6 checks passed
@ermos
ermos deleted the feat/entries-cache branch October 15, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant