I'm using Passport with Node.js which allows you to set a User object in the header when you log in (req.user). I figured it'd be 'better' to store persistent user info in that header, such as a username, so a page template can be rendered with some basic user info without having to re-request it from the database every time. Maybe I'm wrong on that.
Regardless, this works wonderfully until the user changes that info (such as updating their username or something), which makes the Passport User header out of date with what's stored in the database. Is there a way to update this header object without forcing the user to re-log in? Is this just a terrible approach to begin with?
If so, what's the best way to retrieve basic user info needed for every page load of an app? I can't imagine retrieving the same info from the database every time is a good idea. I'm using Express and Passport for session management.