Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.6
    • Fix Version/s: 4.7.13
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      I did quite a bit of digging into the acl cache & while it's a nest there is one easy win I identified. The second call to CRM_ACL_BAO_Cache::updateEntry($userID); in this code is expensive and it is obliterated moments later by the CRM_Contact_BAO_Contact_Utils::clearContactCaches();

      I think until we have a better plan it probably makes sense to clear contact caches after an import - but it's hard to argue we should fill them up immediately before hand

      // If ACL applies to the current user, update cache before running the import.
      if (!CRM_Core_Permission::check('view all contacts'))

      { $session = CRM_Core_Session::singleton(); $userID = $session->get('userID'); CRM_ACL_BAO_Cache::updateEntry($userID); }

      // run the import
      $importJob->runImport($this);

      // update cache after we done with runImport
      if (!CRM_Core_Permission::check('view all contacts'))

      { CRM_ACL_BAO_Cache::updateEntry($userID); }

      // clear all caches
      CRM_Contact_BAO_Contact_Utils::clearContactCaches();

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: