By: Michael Lynch <git@mtlynch.io>
Load the request user once per request into context requireOwner, the owner middleware, and uploadPost each loaded the same user from the store independently, so an authenticated upload request hit ReadUserByID up to three times. Introduce a resolveUser middleware that loads the user once and caches it on the request context; currentUser and newPageData now read from that cache. Every authenticated page request now does a single user read. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>