Remove xml formatting to reduce resulting filesize
This commit is contained in:
@@ -133,7 +133,6 @@ class ResellerController extends ActionController
|
|||||||
public function xmlAction(Reseller $reseller)
|
public function xmlAction(Reseller $reseller)
|
||||||
{
|
{
|
||||||
$cacheKey = sprintf('reseller_export_xml_full_%d', $reseller->getUid());
|
$cacheKey = sprintf('reseller_export_xml_full_%d', $reseller->getUid());
|
||||||
|
|
||||||
if (($xml = $this->cache->get($cacheKey)) === false) {
|
if (($xml = $this->cache->get($cacheKey)) === false) {
|
||||||
$data = $this->resellerDataService->preprocessAll($reseller);
|
$data = $this->resellerDataService->preprocessAll($reseller);
|
||||||
$encoders = [new XmlEncoder('products')];
|
$encoders = [new XmlEncoder('products')];
|
||||||
@@ -142,7 +141,7 @@ class ResellerController extends ActionController
|
|||||||
$xml = $serializer->serialize(
|
$xml = $serializer->serialize(
|
||||||
$data,
|
$data,
|
||||||
'xml',
|
'xml',
|
||||||
[ 'xml_encoding' => 'utf-8', 'xml_format_output' => true ]
|
[ 'xml_encoding' => 'utf-8', 'xml_format_output' => false ]
|
||||||
);
|
);
|
||||||
$this->cache->set($cacheKey, $xml, [], 3600);
|
$this->cache->set($cacheKey, $xml, [], 3600);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user