mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-41019 improve language caching
Includes: * no more hacky reloads, everything is written only once and kept until cache reset * lang menu list is now cached in MUC * both string and lang menu caches are compatible with local caches on cluster nodes * config-dist.php cleanup
This commit is contained in:
parent
99a9d8d937
commit
598a82c950
9 changed files with 134 additions and 179 deletions
|
@ -3452,11 +3452,8 @@ function get_formatted_help_string($identifier, $component, $ajax = false) {
|
|||
global $CFG, $OUTPUT;
|
||||
$sm = get_string_manager();
|
||||
|
||||
if (!$sm->string_exists($identifier, $component) ||
|
||||
!$sm->string_exists($identifier . '_help', $component)) {
|
||||
// Strings in the on-disk cache may be dirty - try to rebuild it and check again.
|
||||
$sm->load_component_strings($component, current_language(), true);
|
||||
}
|
||||
// Do not rebuild caches here!
|
||||
// Devs need to learn to purge all caches after any change or disable $CFG->langstringcache.
|
||||
|
||||
$data = new stdClass();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue