// Just for future use
$productFeed->setExpiry(newDateTime()); $productFeed->setLastChange(newDateTime());
// Clear feed cache
$cacheDir = $this->container->getParameter('shopware.product_export.cache_dir'); if(!\is_string($cacheDir)){ thrownewRuntimeException('Parameter shopware.product_export.cache_dir has to be an string'); }
if(!is_dir($cacheDir)){ if(@mkdir($cacheDir, 0777, true) === false){ thrownewRuntimeException(sprintf("Unable to create the %s directory (%s)\n", 'Productexport', $cacheDir)); } }