Hi,
An example: The following lines are php code in a WikiMedia page.
I try to believe you mean your local MediaWiki install instead of Wikimedia servers ;-)
echo date('Y-m-d, H:i:s');
$dbw->query("delete from cur"); would show better how useful your plugin is.
When this page is first rendere it produces the output: 2004-10-12 01:11:23
If it is not wikimedia, and I still hope it is not, and you did not setup otherwise, you nay have just one cache - the one in your browser. If you use http proxy cache, then pages might be still there. If you use parser cache, then (hey, you really use parser cache?) you should not.
How to # prevent a page from being cached?
Set cur_touched on every hit, or remove cache-control directives in source and disable parser cache. Or extend communcation between parser and parsercache. :)
# force a reload of a page?
Use forced-reload feature of your browser.
# clear a certain page from cache? # clear the cache?
Which cache?
Cheers, Domas
I try to believe you mean your local MediaWiki install instead of
Wikimedia servers ;-) I mean my local installation of the WikiMedia software.
$dbw->query("delete from cur"); would show better how useful your plugin
is. I cannot accress $dbw. A "global $dbw;" doesn't help. How to access variables like $dbw?
# prevent a page from being cached?
Set cur_touched on every hit...
Then I cannot do it out of the <php> tags, because that php is not parsed. And to set cur_touched... I don't know if it ist hat good(?).
# clear the cache?
Which cache?
The cache of the WikiMedia software (my local installation).
$wgCachePages = false; disables the caching of files generally. And I don't know what to do to decide dynamically - if the page can be cached or not. I don't want create a project with mainly dynamic sites, hence it makes no sense do prohibit site caching. It would only raise the loading time.
Arvalux.
On 12 Oct 2004, at 17:04, Arvalux wrote:
I try to believe you mean your local MediaWiki install instead of
Wikimedia servers ;-) I mean my local installation of the WikiMedia software.
Apologies in advance, I'm not trying to be a smart-aleck, but the software is called '''MediaWiki''', and as you've probably noticed people tend to take that distinction quite seriously, for various reasons.
-- ropers [[en:User:Ropers]] www.ropersonline.com
Arvalux -- To clarify further (pls see below)
On 12 Oct 2004, at 19:54, Jens Ropers wrote
On 12 Oct 2004, at 17:04, Arvalux wrote:
I try to believe you mean your local MediaWiki install instead of
Wikimedia servers ;-) I mean my local installation of the WikiMedia software.
Apologies in advance, I'm not trying to be a smart-aleck, but the software is called '''MediaWiki''', and as you've probably noticed people tend to take that distinction quite seriously, for various reasons.
...among other things to stay clear of the (admittedly existing) potential for confusion:
'''Wikimedia''' is the name of the Wikimedia Foundation, the parent organization encompassing our various projects such as Wikipedia, Wiktionary, Wikispecies, Wikicommons, etc. '''MediaWiki''' is the wiki software that is developed for and used by these projects (and available for others to use for their wikis as well). '''Wikipedia''' -- the free encyclopedia -- is but ONE project of the Wikimedia Foundation. '''Wiki''' is a generic term to describe certain kinds of collaborative websites that can be user/visitor-edited (and most Wikimedia foundation websites are examples of wikis). '''Wiki software''' is any software that powers wiki websites at the backend. Such software is also called a '''wiki engine'''. There are MANY other wiki engines besides MediaWiki, big and small; good, bad and ugly ones; a list is here: http://c2.com/cgi/wiki?WikiEngines
All -- Anybody have a good idea where to post this info prominently? Or better yet, could whoever knows please go ahead and post this info prominently? Because these matters frequently seem to be a source of confusion.
-- ropers [[en:User:Ropers]] www.ropersonline.com
Coming upon yet another situation where it would be nice to reference a quick guide to often-confused names, I've expanded Jens Ropers' list (below) into a page on meta: explaining the difference between different terms, and highlighting how they should and shouldn't be used.
http://meta.wikimedia.org/wiki/Names
I've inserted some references to it at relevant points around meta:, but please link to it from wherever you think would be appropriate. [And, obviously, improve on anything non-optimal about it...] I've called it "Names" rather than something like "Often-confused terms" so that it's nice and easy to remember; my idea being that when somebody misuses one of these terms, we can say "BTW, please see http://meta.wikimedia.org/wiki/Names".
Thanks Jens for the idea, and the basis of the text. It may be cute having names which are all puns on each other, but it sure is confusing to the unitiated!
On Tue, 12 Oct 2004 20:12:50 +0200, Jens Ropers ropers@ropersonline.com wrote:
'''Wikimedia''' is the name of the Wikimedia Foundation, the parent organization encompassing our various projects such as Wikipedia, Wiktionary, Wikispecies, Wikicommons, etc. '''MediaWiki''' is the wiki software that is developed for and used by these projects (and available for others to use for their wikis as well). '''Wikipedia''' -- the free encyclopedia -- is but ONE project of the Wikimedia Foundation. '''Wiki''' is a generic term to describe certain kinds of collaborative websites that can be user/visitor-edited (and most Wikimedia foundation websites are examples of wikis). '''Wiki software''' is any software that powers wiki websites at the backend. Such software is also called a '''wiki engine'''. There are MANY other wiki engines besides MediaWiki, big and small; good, bad and ugly ones; a list is here: http://c2.com/cgi/wiki?WikiEngines
All -- Anybody have a good idea where to post this info prominently? Or better yet, could whoever knows please go ahead and post this info prominently? Because these matters frequently seem to be a source of confusion.
On Tue, 12 Oct 2004 17:04:47 +0200, Arvalux arvalux@yahoo.de wrote:
$dbw->query("delete from cur"); would show better how useful your plugin
is. I cannot accress $dbw. A "global $dbw;" doesn't help. How to access variables like $dbw?
I guess you should count yourself lucky: your hack is less insecure than it looks, and can't access global variables. I'm not too sure what it *might* be able to do though.
# prevent a page from being cached?
Set cur_touched on every hit...
Then I cannot do it out of the <php> tags, because that php is not parsed. And to set cur_touched... I don't know if it ist hat good(?).
Perhaps you need to create a cur_nocache flag, automatically set if the page contains <php> elements. Or (it's crazy but it just might work) you could set cur_touched to some time in the future whenever the page is displayed; that way, the cache will always be older than the timestamp says it should be.
On Tue, Oct 12, 2004 at 09:14:53PM +0100, Rowan Collins wrote:
On Tue, 12 Oct 2004 17:04:47 +0200, Arvalux arvalux@yahoo.de wrote:
$dbw->query("delete from cur"); would show better how useful your plugin
is. I cannot accress $dbw. A "global $dbw;" doesn't help. How to access variables like $dbw?
I guess you should count yourself lucky: your hack is less insecure than it looks, and can't access global variables. I'm not too sure what it *might* be able to do though.
$dbw is no global. Use $dbw =& wfGetDB( DB_MASTER ); to initialize $dbw.
Regards,
jens
Jens Frank wrote:
On Tue, Oct 12, 2004 at 09:14:53PM +0100, Rowan Collins wrote:
On Tue, 12 Oct 2004 17:04:47 +0200, Arvalux arvalux@yahoo.de wrote:
$dbw->query("delete from cur"); would show better how useful your plugin
is. I cannot accress $dbw. A "global $dbw;" doesn't help. How to access variables like $dbw?
I guess you should count yourself lucky: your hack is less insecure than it looks, and can't access global variables. I'm not too sure what it *might* be able to do though.
$dbw is no global. Use $dbw =& wfGetDB( DB_MASTER ); to initialize $dbw.
Why are you all explaining to him how to delete his entire wiki? He asked how to clear the cache, not destroy the site.
-- Tim Starling
Tim Starling wrote:
Why are you all explaining to him how to delete his entire wiki? He asked how to clear the cache, not destroy the site.
Domas has explained to me via IRC that he was joking, although I think $dbw->query("delete from cur") is a joke likely to be lost on the average user.
Instead try:
wfQuery("delete from cur", DB_WRITE);
;)
-- Tim Starling
wikitech-l@lists.wikimedia.org