How to get dynamic content refreshing in Mediawiki with cache problems


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.


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


Reacties (0)

Geen resultaten gevonden