[Mediawiki-l] Caching is making me crazy...

Jan Steinman Jan at Bytesmiths.com
Fri Feb 18 19:46:52 UTC 2005


I don't think it has anything to do with the browser. It's a server 
issue. I *am* retrieving the page from the server -- I can see the hit 
in my logs, and I can see the time it takes to generate the page. (If 
it's coming from a cache, why does it take so long, anyway? Seems to be 
the worst of both worlds! :-)

On 18 Feb 2005, at 11:41, Muzaffer Ozakca wrote:

> I have the same problem. There should a HTTP header to invalidate 
> caches so
> that the browser retrieves the page from the server. I guess, we can 
> look at
> the code of recent changes and OutputPage.php to find out what needs 
> to be
> sent. Then it should be OK, I believe, to do $wgOut->whatever() in the
> extension code to send it.
>
> Muzo
>
>> -----Original Message-----
>> From: mediawiki-l-bounces at Wikimedia.org [mailto:mediawiki-l-
>> bounces at Wikimedia.org] On Behalf Of Jan Steinman
>> Sent: Thursday, February 17, 2005 11:34 PM
>> To: MediaWiki announcements and site admin list
>> Subject: [Mediawiki-l] Caching is making me crazy...
>>
>> I'm playing with extensions, but am having trouble seeing the results.
>>
>> How can I mark an article as "dirty" in an extension, so it will
>> refresh every time?
>>
>> Here's my extension, using the Unix fortune(6) command, which returns 
>> a
>> random fortune each time, but when refreshed in a browser, I get the
>> same one back each time. When I click "edit," I get new results, but
>> when I refresh my browser, I do not. I even turned debugging on in the
>> browser and made sure the browser cache was cleared. (It's taking
>> enough time; it's obviously doing SOMETHING on the server.)
>>
>> Another odd thing happens: if I use system() or passthru(), the 
>> fortune
>> DOES refresh, but it prints at the top of the window, rather than
>> inside the content area. When I tried shell_exec(), it puts the same
>> old fortune in the content area each time!
>>
>> extensions/Fortune.php
>> <?php
>> $wgExtensionFunctions[] = 'wfFortune';
>>
>> function wfFortune() {
>>       global $wgParser;
>>       $wgParser->setHook('fortune', 'renderFortune');
>> }
>>
>> function renderFortune($input) {
>>      $output = "<p><i>";
>>      $output .= shell_exec('/sw/bin/fortune');
>>      $output .= '</i></p>';
>>      return $output;
>> }
>> ?>
>>
>> :::: We in America today are nearer to the final triumph over poverty
>> than ever before in the history of any land. -- Herbert Hoover, 1928
>> :::: Jan Steinman <http://www.Bytesmiths.com>
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> MediaWiki-l at Wikimedia.org
>> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
>

:::: Conflict cannot survive without your participation. -- Wayne Dyer
:::: Jan Steinman <http://www.Bytesmiths.com/Van>




More information about the MediaWiki-l mailing list