Commit d7b44d5e authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-32377 do not rewrite on-disk string cache when double checking if string...

MDL-32377 do not rewrite on-disk string cache when double checking if string really does not exist in get_string()

This should help with performance on production sites and may indirectly resolve race condition problems in MDL-31904.
parent ea7d4b09
......@@ -6471,8 +6471,11 @@ class core_string_manager implements string_manager {
return 'en';
}
if ($this->usediskcache) {
// maybe the on-disk cache is dirty - let the last attempt be to find the string in original sources
// maybe the on-disk cache is dirty - let the last attempt be to find the string in original sources,
// do NOT write the results to disk cache because it may end up in race conditions see MDL-31904
$this->usediskcache = false;
$string = $this->load_component_strings($component, $lang, true);
$this->usediskcache = true;
}
if (!isset($string[$identifier])) {
// the string is still missing - should be fixed by developer
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment