Last modified: 2012-12-30 20:55:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 40869 - API has 2 methods of setting cache mode
API has 2 methods of setting cache mode
Status: NEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2012-10-08 20:35 UTC by Sam Reed (reedy)
Modified: 2012-12-30 20:55 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2012-10-08 20:35:27 UTC
The api seem to have both:

$this->getMain()->setCacheMode( 'anon-public-user-private' );

and also

	public function getCacheMode( $params ) {
		return 'anon-public-user-private';
	}

I don't really see any need why we need both (though, if someone has a compelling enough reason, this can be WONTFIX'd or something)
Comment 1 Roan Kattouw 2012-10-11 01:49:05 UTC
Is it at least the case that all core modules use one and not the other? Or is the usage mixed? Maybe use cases would shed more light on why both of these exist.
Comment 2 Sam Reed (reedy) 2012-10-11 18:27:51 UTC
In core:
* 4 usages of $this->getMain()->setCacheMode()
* 34 declarations of function getCacheMode( $params ) {}

Extensions:
* 6 usages of $this->getMain()->setCacheMode()
* 19 declarations of function getCacheMode( $params ) {}

They do seem to be used somewhat interchangeably..

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links