Precache all thumbnails and pinned originals inside open() (closes #48)
check / check (push) Successful in 26s

Precaches aggressively inside open(): every thumbnail (newest first, through the shared thumbnail pool, never evicted; visible/ahead requests preempt the background fill) and the pinned originals — the favorites album plus every file within precacheOriginalsDays (default 7) of the newest takenAt — through the content pool. The pinned set integrates with the #47 eviction hook; when the window moves or a favorite is removed, files become ordinary evictable originals. open() options precacheThumbnails/precacheOriginals/precacheOriginalsDays; progress via onProgress/status().

Model: opus-4-8
This commit was merged in pull request #73.
This commit is contained in:
2026-09-22 21:21:34 +02:00
parent e8575780e4
commit 2e00139d3c
6 changed files with 835 additions and 23 deletions
+4
View File
@@ -142,6 +142,10 @@ const openLibrary = (source: ContentSource): Promise<Library> =>
cacheDirectory: join(root, "cache"),
contentSource: source,
refreshIntervalSeconds: 3600,
// These tests count exact fetches; the background precache (#48) would
// add its own, so it is off here (it is covered in precache.test.ts).
precacheThumbnails: false,
precacheOriginals: false,
});
const readLedger = (