Arvalux wrote:
Hello.
I've extended WikiMedia by a <php> tag, that I can include dynamic contents
to the pages. See:
http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/13631
Now I've the problem that a rendered page will not be rendered again if it
is cached.
An example: The following lines are php code in a WikiMedia page.
<php>
// output the date in format yyyy-mm-dd, hh:nn:ss
echo date('Y-m-d, H:i:s');
</php>
When this page is first rendere it produces the output:
2004-10-12 01:11:23
Now clickling refresh doesn't change the output; hence *my question is*:
How to
# prevent a page from being cached?
The page is cached by the browser, because headers set by
OutputPage::sendCacheControl() tell it to. You can turn off the client
cache headers for a particular page by putting the following in your
ParsePHPTag() function:
global $wgOut;
$wgOut->enableClientCache(false);
# force a reload of a page?
Ctrl-R in Mozilla & friends, ctrl-F5 in IE.
# clear a certain page from cache?
You can update cur_touched and clear the squid cache if one exists by
requesting a purge URL e.g.
http://en.wikipedia.org/w/wiki.phtml?title=Some_article&action=purge
# clear the cache?
To invalidate the cache for all pages at once, set $wgCacheEpoch in
LocalSettings.php to the current date, in YYYMMDDHHMMSS format.
-- Tim Starling