Resource icon

Cache Permission Checks 1.5.0

No permission to buy ($35.00)
Compatible XF 2.x versions
  1. 2.2
  2. 2.3
Additional requirements
php 7.2+
Requires StandardLib v1.19.0+
Require Redis Cache v2.17.0+
Redis (v3.0.0 or better)
phpredis (for performance)
License
https://atelieraphelion.com/products/license-agreement
Updates duration
12 Months ($25 Yearly Renewal + GST for Australian Residents)
Visible branding
No
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;
Related resources
Author
Xon
Views
1,571
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from Xon

Latest updates

  1. 1.5.0 - XF2.3 Compatibility update

    XF2.3 compatibility update Require Redis Cache v2.17.0+
  2. 1.4.0 - Feature update

    This update vastly improves the speed for changing permissions when a large number of...
  3. 1.3.1 - Feature update

    Require Standard Library by Xon v1.18.0+ If using Redis Cache, recommend Redis Cache v2.13.0+ as...

Latest reviews

With the update to 1.40, the permission rebuild has become 100 times faster. It no longer takes 3 minutes to complete, but only a few seconds. Especially if you often create nodes or do something to the groups, this addon is highly recommended. In addition, the performance of the advanced search when you only look under different nodes has become much faster. Absolutely recommended for anyone who has many nodes and many users and therefore many different permissions.
Top Bottom