}
/**
+ * All factors that uniquely identify this request, except 'modules'.
+ *
+ * The list of modules is excluded here for legacy reasons as most callers already
+ * split up handling of individual modules. Including it here would massively fragment
+ * the cache and decrease its usefulness.
+ *
+ * E.g. Used by RequestFileCache to form a cache key for storing the reponse output.
+ *
* @return string
*/
public function getHash() {
if ( !isset( $this->hash ) ) {
$this->hash = implode( '|', array(
- $this->getLanguage(), $this->getDirection(), $this->getSkin(), $this->getUser(),
+ $this->getLanguage(), $this->getSkin(), $this->getUser(),
$this->getImage(), $this->getVariant(), $this->getFormat(),
$this->getDebug(), $this->getOnly(), $this->getVersion()
) );
$this->assertEquals( $derived->getModules(), array( 'test.context' ) );
$this->assertEquals( $derived->getOnly(), 'scripts' );
$this->assertEquals( $derived->getSkin(), 'fallback' );
- $this->assertEquals( $derived->getHash(), 'zh|ltr|fallback||||||scripts|' );
+ $this->assertEquals( $derived->getHash(), 'zh|fallback||||||scripts|' );
}
public function testSetLanguage() {
$derived->setLanguage( 'nl' );
// Assert that subclass is able to clear parent class "hash" member
- $this->assertEquals( $derived->getHash(), 'nl|ltr|fallback||||||scripts|' );
+ $this->assertEquals( $derived->getHash(), 'nl|fallback||||||scripts|' );
}
}