Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11275

ACL cache is invalidated too often

    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.

        Attachments

          Activity

            People

            • Assignee:
              adamw Adam Wight
              Reporter:
              adamw Adam Wight
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: