Precache all thumbnails and pinned originals from Library.open (closes #48)
check / check (push) Successful in 31s
check / check (push) Successful in 31s
Two background fills start inside open() with no caller input, through the shared pools (#45) at background priority, so on-demand work always preempts them. Thumbnails: every file newest first until all are on disk, sharing the pool with thumbnails.ensure. Originals: the pinned set — favorites, then the latest-week window ending at the newest file — through the content pool. The pinned set is the eviction predicate (#47): a pinned original is never evicted, and a file that leaves the set (favorite removed, or window moved on a later refresh) becomes an ordinary evictable original. Each refresh re-kicks the fills to pick up new files and retry failures. Progress via open() onProgress and status(). Model: opus-4-8
This commit is contained in:
@@ -99,6 +99,10 @@ describe("Library content wiring", () => {
|
||||
cacheDirectory: join(root, "cache"),
|
||||
contentSource: source,
|
||||
refreshIntervalSeconds: 3600,
|
||||
// On-demand wiring only; the background precache (#48) is covered
|
||||
// in precache.test.ts and would race the exact-count assertions.
|
||||
precacheThumbnails: false,
|
||||
precacheOriginals: false,
|
||||
});
|
||||
|
||||
const photo = lib.photos.byID({ fileID: 1 });
|
||||
@@ -122,6 +126,10 @@ describe("Library content wiring", () => {
|
||||
cacheDirectory: join(root, "cache"),
|
||||
contentSource: source,
|
||||
refreshIntervalSeconds: 3600,
|
||||
// On-demand wiring only; the background precache (#48) is covered
|
||||
// in precache.test.ts and would race the exact-count assertions.
|
||||
precacheThumbnails: false,
|
||||
precacheOriginals: false,
|
||||
});
|
||||
|
||||
const results = await lib.thumbnails.ensure({
|
||||
|
||||
Reference in New Issue
Block a user