- Compatible XF 2.x versions
-
- 2.1
- 2.2
- Additional requirements
-
php 7.0+
Standard Library by Xon
Redis Cache by Xon
Redis (v3.0.0 or better)
phpredis (for performance)
- Updates duration
- 12 Months ($25 Yearly Renewal + GST for Australian Residents)
- Visible branding
- No
Reduce data fetched from MySQL and queries by bulk-fetching pre-computed sets from a Redis cache
XenForo permission-sets are stored per row per content-type, and there are a number of cases where this can result in a large number of rows being fetched or N+1 queries.
This add-on extracts the permission sets and caches the resulting set for by permission_combination_id/content_type.
This includes the special "global" permission set (as permission_combination_id/
Support the cache context
Criteria for use of this add-on
Requirements
Cache invalidation
XenForo permission-sets are stored per row per content-type, and there are a number of cases where this can result in a large number of rows being fetched or N+1 queries.
This add-on extracts the permission sets and caches the resulting set for by permission_combination_id/content_type.
This includes the special "global" permission set (as permission_combination_id/
#user
)Support the cache context
permComboIds
Criteria for use of this add-on
Requirements
- Requires php 7.0+
- Requires XenForo 2.1+
- Requires Redis Cache 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()
PHP:
// limit number of permission-sets for different permission combination ids to help control memory usage
$config['permissionCache']['cache_limit'] = 3;
// 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