Some thoughts:

> How many unique visitors would have to log in to run this map out of memory? Let's say one user entry costs 128 bytes. It's probably less, because username + one or two organizations (most likely zero for most users) should not take up that much. 1 Mb of RAM gives you ~8000 users. If you have more people working at your organization, you must be able to spare a few more megabytes of RAM. :)

In the case of our GitHub Enterprise installation, organizations map loosely to teams and projects, not companies. Most users are members of 10-20 organizations easily...

> How often do users leave / join organization? Catche will reset once a day and invalidate itself. And if you really want to cut someone off very quickly, restarting Jenkins is pretty easy.

Restarting Jenkins might be easy but usually is not viable during the day. At least with the number of projects, agents, plugins, and history of builds that we have, Jenkins is a 15+ min process...