How to get dynamic content refreshing in Mediawiki with cache problems

Inleiding

When problems arise in MediaWiki with extensions with dynamic content like Recent Article Lists of RSS an extra trick must be put into the extension.

Stappen

Two options are possible:

1) Put inside the extension (advised, only extensionpage get refreshed):

 $ts = mktime();
 $now = gmdate("YmdHis", $ts + 120);
 $ns = $wgTitle->getNamespace();
 $ti = wfStrencode($wgTitle->getDBkey());
 $sql = "UPDATE cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'";
 wfQuery($sql, DB_WRITE, "");

2) Put inside Localsettings.php (not advised, makes site slower!)

$wgCacheEpoch = gmdate( 'YmdHis' );

Risico's en Tips

Klik hier voor het toevoegen van tips

Handige Links

Source

Reacties (0)

Reageer
Geen resultaten gevonden