Cache results of isAdmin and isManager
isAdmin() is called within the ACL check (and probably various other
places in DokuWiki core). In a Wiki with lots of ACL checks (most
noticable with the indexmenu) and users with a lot of groups (as typical
in corporate ActiveDirectory environments) this check can take a
significant portion of the time of a request time doing exactly the same
thing again and again.
This introduces a static request level cache for the result of the
isAdmin and isManager checks based on the requested user and groups.
A new parameter allows to skip the cache, though I don't think there
should be a good reason to skip the cache except for testing purposes.