From a [TODO](https://github.com/coder/coder/blob/3ec2e96ff47ee18f3d148d38d60b182d1f0b4ffa/coderd/httpmw/workspaceagent.go#L86-L115) in `coderd/httpmw/workspaceagent.go`: Every time we authorize a workspace agent with its API token, we look up the roles of the workspace owner. This currently involves: - GetWorkspaceByAgentID - GetUserByID - GetAuthorizationUserRoles We can improve this by: - Creating a single query for the above mapping AgentID -> owner roles - Creating an in-memory cache for the above which is updated in the background