+
+ /**
+ * Get the human-readable name of the repo.
+ * @return string
+ */
+ public function getDisplayName() {
+ // We don't name our own repo, return nothing
+ if ( $this->isLocal() ) {
+ return null;
+ }
+ // 'shared-repo-name-wikimediacommons' is used when $wgUseInstantCommons = true
+ $repoName = wfMsg( 'shared-repo-name-' . $this->name );
+ if ( !wfEmptyMsg( 'shared-repo-name-' . $this->name, $repoName ) ) {
+ return $repoName;
+ }
+ return wfMsg( 'shared-repo' );
+ }
+
+ /**
+ * Returns true if this the local file repository.
+ *
+ * @return bool
+ */
+ function isLocal() {
+ return $this->getName() == 'local';
+ }
+
+
+ /**
+ * Get a key on the primary cache for this repository.
+ * Returns false if the repository's cache is not accessible at this site.
+ * The parameters are the parts of the key, as for wfMemcKey().
+ *
+ * STUB
+ */
+ function getSharedCacheKey( /*...*/ ) {
+ return false;
+ }
+
+ /**
+ * Get a key for this repo in the local cache domain. These cache keys are
+ * not shared with remote instances of the repo.
+ * The parameters are the parts of the key, as for wfMemcKey().
+ */
+ function getLocalCacheKey( /*...*/ ) {
+ $args = func_get_args();
+ array_unshift( $args, 'filerepo', $this->getName() );
+ return call_user_func_array( 'wfMemcKey', $args );
+ }