Skip to content

Commit 1db265d

Browse files
committed
21842 - do not cache absolute file paths
Github issue: #21842 In customer and customer_address validation context the validator factory no longer caches absolute file paths for the validation.xml files (currently two file) as the file content is evaluated later in the filesystem directly and the file paths may not be correct in a multi server setup with shared cache (id_prefix)
1 parent 6468260 commit 1db265d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/internal/Magento/Framework/Validator/Factory.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,7 @@ public function __construct(
7575
protected function _initializeConfigList()
7676
{
7777
if (!$this->_configFiles) {
78-
$this->_configFiles = $this->cache->load(self::CACHE_KEY);
79-
if (!$this->_configFiles) {
80-
$this->_configFiles = $this->moduleReader->getConfigurationFiles('validation.xml');
81-
$this->cache->save(
82-
$this->getSerializer()->serialize($this->_configFiles->toArray()),
83-
self::CACHE_KEY
84-
);
85-
} else {
86-
$filesArray = $this->getSerializer()->unserialize($this->_configFiles);
87-
$this->_configFiles = $this->getFileIteratorFactory()->create(array_keys($filesArray));
88-
}
78+
$this->_configFiles = $this->moduleReader->getConfigurationFiles('validation.xml');
8979
}
9080
}
9181

0 commit comments

Comments
 (0)