Skip to content

Commit

Permalink
MDL-49398 accesslib: Simplify role definition loading and cache
Browse files Browse the repository at this point in the history
This change removes the complex and partial loading of role definition data for users.
It is replaced by keeping one system-wide definition for each role in MUC.

This is cheaper to regenerate as it avoids complex database queries (repeated LEFT JOIN to context).
Memory usage is kept low thanks to array CoW for each user access data.
  • Loading branch information
tlevi authored and sk-unikent committed Jun 2, 2017
1 parent 78ab4f7 commit e705e69
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 423 deletions.
1 change: 1 addition & 0 deletions lang/en/cache.php
Expand Up @@ -63,6 +63,7 @@
$string['cachedef_tagindexbuilder'] = 'Search results for tagged items';
$string['cachedef_questiondata'] = 'Question definitions';
$string['cachedef_repositories'] = 'Repositories instances data';
$string['cachedef_roledefs'] = 'Role definitions';
$string['cachedef_grade_categories'] = 'Grade category queries';
$string['cachedef_string'] = 'Language string cache';
$string['cachedef_tags'] = 'Tags collections and areas';
Expand Down

0 comments on commit e705e69

Please sign in to comment.