Neos\Flow\Cache\CacheManager::flushTranslationCachesByChangedFiles PHP Method

flushTranslationCachesByChangedFiles() protected method

Flushes I18n caches if translation files have changed
See also: flushSystemCachesByChangedFiles()
protected flushTranslationCachesByChangedFiles ( array $changedFiles ) : void
$changedFiles array A list of full paths to changed files
return void
    protected function flushTranslationCachesByChangedFiles(array $changedFiles)
    {
        foreach ($changedFiles as $pathAndFilename => $status) {
            if (preg_match('/\\/Translations\\/.+\\.xlf/', $pathAndFilename) === 1) {
                $this->systemLogger->log('The localization files have changed, thus flushing the I18n XML model cache.', LOG_INFO);
                $this->getCache('Flow_I18n_XmlModelCache')->flush();
                break;
            }
        }
    }