$resource =
$this->
Request()->
get('resource'
);
$provider =
$urlProviderFactory->
getProvider($resource);
$urls =
$provider->
getUrls($context,
$limit,
$offset);
$view =
$this->
View();
$this->
get('events'
)->
addListener('Shopware_Components_CacheWarmer_ErrorOccured',
function D
) use ($view) { $view->
assign('requestFailed', true
);
});
$cacheWarmer->
warmUpUrls($urls,
$context,
$concurrentRequests);
$this->
View()->
assign([ 'success' => true,
'data' =>
['count' => \
count($urls)],
]);
} /**
* Regenerate sitemap cache
*/
public function buildSitemapCacheAction() {