XenForo Cache Permission Checks 1.4.0 Download

File Size: KB

Download Count:

File Update Date:

You can free Cache Permission Checks


1.4.0 download the source from the button above

Vastly increases the speed for rebuilding permissions when large numbers of user-groups and nodes exists.

Precomputed permissions are fetched from redis and not MySQL, reducing data required from MySQL and removing a number of joins. This can also fully-remove XenForo needing to repeatedly query for per-content type permissions (N+1 query behavior).

Support the cache context permComboIds

Criteria for use of this add-on
Use of this add-on is only recommended if all the following criteria are met;
  1. A multiple server setup, where the database is separate from multiple front-end webserver
  2. Large numbers of user-groups/node combinations.
It is strongly preferred that Redis is configured to have a read-only slave on each front-end webserver

Requirements
  • Requires php 7.2+
  • Requires XenForo 2.2+
  • Requires Redis Cache v2.15.4+ due to active selective cache invalidation

Cache invalidation
  • Editing permissions for user-group/user/moderators
  • Add-on installed/upgraded/uninstalled
  • Any automated process which touches;
    • \XF\Service\UpdatePermissions::triggerCacheRebuild()
    • \XF\Entity\User::rebuildPermissionCombination()
    • \XF\Permission\Builder::rebuildCombination()
config.php options

Default values are:
PHP:
// time in seconds to cache entries for
$config['permissionCache']['cache_time'] = 7 * 86400;
// Prune 'false' entires, as this can be accurately represented with an absence
$config['permissionCache']['sparse'] = true;
 
Back
Top