class Shopware_Components_SeoIndex extends Enlight_Class
{ /**
* The old 'refreshIndex' method from the RouterRewrite Plugin
*
* This method ist used, if the SEO index needs to be build in *one* request - e.g. CronJob or Live
*
* @throws Zend_Db_Adapter_Exception
*/
public function refreshSeoIndex() { list
($cachedTime,
$elementId,
$shopId) =
$this->
getCachedTime();
$cache =
(int) Shopware()->
Config()->
get('routerCache'
);
$cache =
$cache < 360 ? 86400 :
$cache;
$currentTime =
date('Y-m-d H:i:s'
);
if (strtotime($cachedTime) <
time() -
$cache) { $this->
setCachedTime($currentTime,
$elementId,
$shopId);
$resultTime =
Shopware()->
Modules()->
RewriteTable()->
sCreateRewriteTable($cachedTime);
if ($resultTime ===
$cachedTime) { $resultTime =
$currentTime;
}