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.
This commit is contained in:
Petr Skoda
2012-04-16 23:58:50 +02:00
parent ea7d4b0972
commit d7b44d5e95
+4 -1
View File
@@ -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