diigo-cache: dispose RPC stubs after each fetch; one fetch per miss

Two bugs in page()'s miss path, found while building the fill job:

- the webapp stubs (app, pathjoin, query) were never disposed, which
  kept the DO from being evicted (evictDurableObject hung after a single
  miss); they are now disposed once the page is in hand
- a miss on page n > 1 also fetched page 1 and threw it away, doubling
  diigo calls; every page carries `total`, so only page n is fetched

Regression test: a miss, then eviction, then a cache hit. tsconfig adds
the ESNext.Disposable lib for Symbol.dispose.

Generated-by: Claude Opus 5.5
This commit is contained in:
dckc committed 2026-10-07 04:25:23 -05:00
1 parent cf5ccce4e2
commit 530942f5d9
3 files changed
+30 -13

No files matched your search

+1
View File
@@ -7,6 +7,7 @@
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"lib": ["ES2022", "ESNext.Disposable"],
"noEmit": true,
"types": []
},