Details
-
Type: Bug
-
Status: Won't Do
-
Priority: Minor
-
Resolution: Won't Do
-
Affects Version/s: 4.2.6
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
Description
We could save a lot of db queries (for us, 12 queries per new contact record) by only calling CRM_ACL_BAO_Cache::resetCache when the new ACL values might affect access.
Some processes already set $config->doNotResetCache = 1 to bypass this invalidation, which is a simple enough workaround.
IMO the ACL should only be invalidated mid-process if there are changes made which affect the effective user of the active process. Otherwise, we should set an invalidation flag which is handled at the end of this request, or the beginning of the next.