Cache private email regex for a request
What does this MR do and why?
When loading large amounts of avatars, such as on a busy blame file, we spend a lot of time regenerating the same static regex for every commit email we try to match. This introduces a request cache wrapper to ensure it's only calculated once per request. This is only stored in memory and so will change on each request, but will prevent it using a surprising amount of resources on a single request.
Changelog: performance
Related #220950
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.