CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • When/how often is the ACL cache rebuilt?
Pages: [1]

Author Topic: When/how often is the ACL cache rebuilt?  (Read 387 times)

DaveFF

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 5
  • Developer at Future First
    • Future First
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.5
  • PHP version: 5.3
When/how often is the ACL cache rebuilt?
December 15, 2014, 09:29:10 am
In what circumstances and how often are ACL cache tables normally rebuilt? Does this always coincide with hook_civicrm_aclWhereClause being run? For example, does it happen when contacts or relationships are created?

Thanks,
Dave
Do Not Contact Until extension: https://civicrm.org/extensions/do-not-contact-until
Organisation Name De-duplicator extension: https://civicrm.org/extensions/organisation-name-de-duplicator

DaveFF

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 5
  • Developer at Future First
    • Future First
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.5
  • PHP version: 5.3
Re: When/how often is the ACL cache rebuilt?
December 17, 2014, 04:16:04 am
I notice in CRM_Contact_BAO_Contact_Permission::cache, that new entries are inserted into the ACL contact cache table (if there aren't any for that user already, or the call has $force set), and then entries for is_deleted contacts are purged.

If the call is forced, there may be entries in civicrm_acl_contact_cache for that user already. These are not being deleted first, before inserting new/updated ones- should they be? As I am running into an issue (although in custom code) that suggests they should be.

(Also, while entries targeting contacts with is_deleted are purged, entries targeting permanently deleted contacts are not. Again, should they be?)

I'm happy to do a patch if this is an actual issue.
Do Not Contact Until extension: https://civicrm.org/extensions/do-not-contact-until
Organisation Name De-duplicator extension: https://civicrm.org/extensions/organisation-name-de-duplicator

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • When/how often is the ACL cache rebuilt?

This forum was archived on 2017-11-26.