alfred
Administrator
Gepostet am:02.02.2007 18:10
#13
Alfred
Re: Wie realisiert man auf einfache Art und Weise, eine Suchmaschinen - Optimierung unter xoops?
02.02.2007 18:10 Zitat:
clownxx schrieb:
function checkCache() {
global $xoopsModule, $xoopsLogger;
if ( $_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime ) {
$template = $this->contentTemplate ? $this->contentTemplate : 'db:system_dummy.html';
$dirname = $xoopsModule->getVar( 'dirname', 'n' );
$this->template->caching = 2;
$this->template->cache_lifetime = $this->contentCacheLifetime;
$this->contentCacheId = $dirname . '|' . str_replace( XOOPS_URL, '', $_SERVER['REQUEST_URI'] );
if ( $this->template->is_cached( $template, $this->contentCacheId ) ) {
$xoopsLogger->addExtra( $template, sprintf('Cached (regenerates every %d seconds)', $this->contentCacheLifetime ) );
$this->render( null, null, $template );
$this->readKeyword();
return true;
}
}
return false;
}
Alfred