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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42869, the corresponding Phabricator task for complete and up-to-date bug report information.
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