Topic page view: authorise, cache by visibility key, then overlay

Topic page view: authorise, cache by visibility key, then overlay A sequence diagram generated by Archify. GET /topic/345-welcome A member sends asession cookie, sothe CDN never answersthis request. load session Middleware setslocale, theme andcolour scheme. member id snapshot + can(read) Groups, masks,moderator powers,unlocks. Denied:403/404, nothingcached. visibility key A hash of thecapability bits thispage declared, neverthe member id. getOrRender(tags) Listener down orheartbeat >5 s late:BYPASS, render fresh,store nothing. prepare() read view model Fresh snapshot andcan() are re-checkedinside prepare. rows variant key Route, params,visibility key,theme@version,plugins generation,locale, scheme,flags. HIT: shared HTML Only when everystored tag versionstill matches. MISS: render() Theme Liquidtemplates render theview model; HTML isstored by variantkey. 200 HTML, private, no-store Shared HTML holdsplaceholders only, nopersonal data. POST /api/me/overlay After paint. Origincheck plusx-bulletin-overlayheader. can(read) per id Also records thevisit, presence andread marker. unread, counts private JSON patches the page GET, no session cookie Cache key is the pathplus the bp cookie(locale.theme.scheme). HIT: cached page MISS: fetch origin Same authorise,visibility key andrender-cache path, asthe Guests group. public, s-maxage=15 Plusstale-while-revalidate=15 andSurrogate-Key tagsfor purges. POST /api/beacon View and presence goto UNLOGGED buffers;content cache tagsare never bumped. Member: authorise before any cache lookup Shared HTML, keyed by what the viewer can see Personal overlay, per member Guest path through the CDN Browser · member or guest · Sequence participant Browser member or guest CDN · guests only · Sequence participant CDN guests only user-app · topic route · Sequence participant user-app topic route Permissions · groups, masks, can() · Sequence participant Permissions groups, masks, can() Render cache · in-process LRU · Sequence participant Render cache in-process LRU Postgres · tables + tag versions · Sequence participant Postgres tables + tag versions user-api · overlay + beacon · Sequence participant user-api overlay + beacon Legend main request return security async trace message