Skip to content

hub: cache non-search feeds for 120s - #1

Merged
midagedev merged 2 commits into
mainfrom
feed-cache-120
Oct 15, 2026
Merged

midagedev merged 2 commits into
mainfrom
feed-cache-120

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Non-search feeds are stored in the Cache API for 120 seconds so a hit does not read D1. The browser is told 60 seconds.

Feeds are /, /sitemap.xml, /api/v1/runs, /hw/:id, /u/:handle and its .json, and each cursor URL of those. A search stays live: a non-empty q, a narrowing filter, a sort other than newest, or scope=mine. On a hub page the card is the path, so gpu in the query is not a search there.

A public publish, delete, or edit drops the front page, the sitemap, that owner's home and its JSON, and /hw/<id> for each card on the tape. Cursor URLs expire by the 120 second TTL. A private run is not on the feeds. The run page stays no-store.

No migration. node --test for this change and the port gate: 9 passed.

A default list, a hub, a user home, the runs API, and the sitemap are stored in the Cache API. A search (q, a filter, a non-default sort, or scope=mine) stays live and no-store. A public publish, delete, or edit drops the front page, the sitemap, that owner's home, and each card's hub. Cursor pages expire with the TTL. Not deployed.
@midagedev
midagedev merged commit 39a6115 into main Oct 15, 2026
3 checks passed
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