fixup! diigo-cache: invalidate the last N days of cached pages
Docs per the docs-files-api skill: a 1–2 line @file; what a declaration is or does in JSDoc on it, not in // comments or the file header. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
76b9ed1494
commit
2a1942fc2a
2 files changed
+24
-28
No files matched your search
+11
-15
@@ -1,17 +1,4 @@
|
||||
/**
|
||||
* @file the Cap'n Web API at /api: trade a cache's webkey for a capability.
|
||||
*
|
||||
* The browser holds the key in a URL fragment (`/cache/#<key>`, see
|
||||
* docs/webkeys.md), so it never reaches the server in a URL. The skeleton
|
||||
* page passes it *in-band* — `api.cache(key)` — and gets back a stub for a
|
||||
* {@link CacheCap}: a facet exposing only what the holder should do (fill,
|
||||
* status, the public companion), never the DO's wiring methods.
|
||||
* Authorization is in-band, so cross-origin calls are safe (capnweb's
|
||||
* note on `newWorkersRpcResponse`); every argument is checked at runtime,
|
||||
* since TypeScript types are erased on the wire.
|
||||
*
|
||||
* @see https://github.com/cloudflare/capnweb
|
||||
*/
|
||||
/** @file the Cap'n Web API at /api: trade a cache's webkey for a capability. */
|
||||
|
||||
import { RpcTarget } from "capnweb";
|
||||
import type { DiigoCacheLogic, FillStatus, PublicCacheLogic } from "./cache.js";
|
||||
@@ -97,7 +84,16 @@ export class CacheCap extends FillCap {
|
||||
}
|
||||
}
|
||||
|
||||
/** the main interface at /api */
|
||||
/**
|
||||
* the main interface at /api. The browser holds a cache's key in a URL
|
||||
* fragment (`/cache/#<key>`, docs/webkeys.md), so it never reaches the
|
||||
* server in a URL; the webkey page passes it *in-band* to {@link cache}
|
||||
* and gets back a {@link CacheCap}. With authorization in-band,
|
||||
* cross-origin calls are safe (capnweb's note on `newWorkersRpcResponse`);
|
||||
* arguments are checked at runtime, since types are erased on the wire.
|
||||
*
|
||||
* @see https://github.com/cloudflare/capnweb
|
||||
*/
|
||||
export class CacheApi extends RpcTarget {
|
||||
#env: ApiEnv;
|
||||
|
||||
|
||||
Reference in new issue
Block a user