i18n writing cache file on every request #2933

christopherdarling opened this Issue Mar 9, 2014 · 2 comments


None yet
3 participants

christopherdarling commented Mar 9, 2014

I have noticed on every page load two files in the cache are being rewritten on every request, the two files are located in;

  • silverstripe-cache/cache/zend_cache---i18nZend_Translate_RailsYaml_Options
  • silverstripe-cache/cache/zend_cache---internal-metadatas---i18nZend_Translate_RailsYaml_Options

On each request the written contents appear to be the same in the file 'zend_cache---i18nZend_Translate_RailsYaml_Options' but very slightly different for the 'zend_cache---internal-metadatas---i18nZend_Translate_RailsYaml_Options' file.

We've stumbled upon this due to a cloud hosting provider using network storage running into flock issues when multiple web servers are trying to write to the above files at the same time. Has anyone else run into similar issues, or any ideas on a fix for this?

p.s. we're setting the local to "en_GB" via mysite/_config.php via i18n::set_locale("en_GB"); removing this or setting it to "en_US" doesn't seem to make any difference.


christopherdarling commented Mar 10, 2014

I've done a little research into this and I've narrowed this down to these lines that are re-creating the cache https://github.com/silverstripe/silverstripe-framework/blob/bb9f84afd5f24efbd14231a26dfc6dfb87c17d32/i18n/i18n.php#L2108-2112 hopefully this helps

simonwelsh added the 3.1 label Mar 15, 2014


chillu commented May 8, 2017

We've changed the whole i18n system in 4.x, and did extensive performance tests on that implementation. Closing off this 3.x bug, either it's been fixed since then, or it isn't impactful enough for other devs to have noticed it as a performance drain

chillu closed this May 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment