MDL-54035 accesslib: separate role definition cache clear

Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
This commit is contained in:
Jonathan Champ
2018-09-21 09:17:42 -04:00
parent 6902f39141
commit b2f349a433
18 changed files with 31 additions and 66 deletions
+1
View File
@@ -208,6 +208,7 @@ class phpunit_util extends testing_util {
// reset all static caches
\core\event\manager::phpunit_reset();
accesslib_clear_all_caches(true);
accesslib_reset_role_cache();
get_string_manager()->reset_caches(true);
reset_text_filters_cache(true);
core_text::reset_caches();