Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.6.5, 2.7.2, 2.8
-
Component/s: Caching
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
-
Fixed Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-47270-core-component-classmap-ordering
Description
The classmap array in core_component.php is ordered based on filesystem ordering. This can be a problem when the cache file is first created in a clustered environment, since each cluster node may be trying to create a different version of the file. There is a sha1 hash comparison in core_component::init() which should let the caching work in a clustered setup, but that fails due to differing ordering of the classmap.
The fix is simply to sort the classmap before writing to the file.