Well, the previous solution didn't work. Try calling:
$wgOut->enableClientCache(false);
In your extension code. You have to declare $wgOut global. It seems to work
now. I guess, we have to keep in mind that this will create extra work on
the server while serving the pages we set the caching off.
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org [mailto:mediawiki-l-
bounces(a)Wikimedia.org] On Behalf Of Muzaffer Ozakca
Sent: Friday, February 18, 2005 2:53 PM
To: 'MediaWiki announcements and site admin list'
Subject: RE: [Mediawiki-l] Caching is making me crazy...
Not sure about that. A normal refresh looks like it really gets the page
from the server. I can refresh my page containing the extension doing a
hard
refresh. In Firefox (on windoze), it's ctrl+f5 or ctrl+refresh button (not
sure of the latter), it should be a similar combination in IE, too.
In SpecialRecentChanges.php, I see:
$wgOut->setSquidMaxage( 10 );
if( $s->lastmod && $wgOut->checkLastModified( $s->lastmod ) ){
# Client cache fresh and headers sent, nothing more to do.
return;
}
I'll try the first line to see if it works.
> -----Original Message-----
> From: mediawiki-l-bounces(a)Wikimedia.org [mailto:mediawiki-l-
> bounces(a)Wikimedia.org] On Behalf Of Jan Steinman
> Sent: Friday, February 18, 2005 2:47 PM
> To: MediaWiki announcements and site admin list
> Subject: Re: [Mediawiki-l] Caching is making me crazy...
>
> 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(a)Wikimedia.org [mailto:mediawiki-l-
> >> bounces(a)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(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)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>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l