v0.4.0
⚡ Client-side navigation. Moving between pages cost a full round trip for every entry on the page, even for a page just visited. The composables asked for cache: 'no-store' and the server answered no-cache, so both ends were locked against the browser cache. Published content is identical for every visitor, so it is now cacheable.
Measured on a real site: ~120 ms of blocked navigation per click, down to the browser answering from its own cache.
The CDN window is the one that matters for first-time visitors — with public, the edge answers instead of the function, so nobody pays for the database.
⚙️ Configuration
eponyme: {
cacheSeconds: 5, // server instance
browserCacheSeconds: 30, // visitor's browser — cannot be purged, keep it short
cdnCacheSeconds: 300, // CDN — purge from `eponyme:entry:published`
}browserCacheSeconds is what makes navigation instant, and the one window nobody can shorten: a visitor holding a copy keeps it until it expires, publication or not. Set it to 0 if a publication must reach everyone immediately.
🔥 Performance
- api: Published entries, collection listings and the sitemap answer
public, max-age, s-maxage, stale-while-revalidate - composables: Published reads no longer force
no-store, so a client-side navigation is served from the browser cache instead of the network
🔒 Security
- server: A middleware marks every Eponyme response
no-store, and only the published routes override it — a route added later is private until someone decides otherwise, rather than public until someone remembers - api: Six routes relied on the absence of a cache header rather than on one — history, statuses, trash, submissions, the user list, and the session route that answers who the caller is. The collections route set none at all, drafts included
- api:
raw=1reads stay out of the shared cache: published content, but with{{ variables }}left unresolved for the editor, so not what a public page renders
🚀 Features
- module:
browserCacheSecondsandcdnCacheSecondsoptions
✅ Tests
- The cache boundary is asserted end to end: published routes are
public, and drafts,rawreads, history, trash, submissions, users and the session route areno-store, authenticated or not
Full Changelog: v0.3.0...v0.4.0