Issue #2202185 by Wim Leers, effulgentsia, msonnabaum, damiankloip, alexpott: Statically cache Role entities to speed up (User|UserSession)::hasPermission().