logo       

Re: Trying to get dynamic content on a page: msg#00201

org.wikimedia.mediawiki

Subject: Re: Trying to get dynamic content on a page

Thanks, Sebastien! After puzzling through a few necessary changes and stuff, I got Sebastien's cache-disable-hack working.

Full code for my "fortune" extension, including an explanation of the cache-disable-hack, is at "http://www.IslandSeeds.org/wiki/Test:Fortune";.

I'm going to move it into a function, so it can more easily be used.

On 13 Mar 2005, at 09:43, Sebastien BARRE wrote:

At 3/13/2005 11:53 AM, Jan Steinman wrote:
On 13 Mar 2005, at 03:27, Mike wrote:

The extension does not get called because the browser has cached it locally. The content is no longer dynamic. Is there anything I can do on the server side to cause the browser to not use its cached version? The extension looks like a nice feature accept it can't deliver dynamic content.

The solutions I've seen proposed is 1) make your dynamic content a Special page, or 2) have pages conditionally set a "no cache flag" when saved, then add spaghetti code throughout the known universe to do different things based on this bit.

Or use the following piece of code/hack in your extension, it works just fine for me to adress this "problem" (yes, it is a problem). Again, a hack, but does the trick until a clean solution is found.

$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, "kwBreadCrumbsNoCache");


--
Sebastien Barre

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l-T31ubCBy5U6GglJvpFV4uA@xxxxxxxxxxxxxxxx
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l



:::: Nature must, in the not too distant future, institute bankruptcy proceedings against industrial civilization. -- William Catton
:::: Jan Steinman <http://www.Bytesmiths.com/Van>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise