Searched hist:"96348 f2713371161f056dbad3a465a6cdedba70b" (Results 1 – 1 of 1) sorted by relevance
/dokuwiki/inc/ |
H A D | auth.php | 96348f2713371161f056dbad3a465a6cdedba70b Mon May 11 13:03:50 UTC 2020 Andreas Gohr <andi@splitbrain.org> 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.
|