]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/filerepo/ForeignDBViaLBRepo.php
MediaWiki 1.17.0
[autoinstallsdev/mediawiki.git] / includes / filerepo / ForeignDBViaLBRepo.php
index 13c9f434f2d0d6c33d0e67c347d26cafa7caefe0..4c530b511d3e5ee9ce221321496e537e14dd4536 100644 (file)
@@ -1,7 +1,14 @@
 <?php
+/**
+ * A foreign repository with a MediaWiki database accessible via the configured LBFactory
+ *
+ * @file
+ * @ingroup FileRepo
+ */
 
 /**
  * A foreign repository with a MediaWiki database accessible via the configured LBFactory
+ *
  * @ingroup FileRepo
  */
 class ForeignDBViaLBRepo extends LocalRepo {
@@ -27,6 +34,21 @@ class ForeignDBViaLBRepo extends LocalRepo {
                return $this->hasSharedCache;
        }
 
+       /**
+        * 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().
+        */
+       function getSharedCacheKey( /*...*/ ) {
+               if ( $this->hasSharedCache() ) {
+                       $args = func_get_args();
+                       array_unshift( $args, $this->wiki );
+                       return implode( ':', $args );
+               } else {
+                       return false;
+               }
+       }
+
        function store( $srcPath, $dstZone, $dstRel, $flags = 0 ) {
                throw new MWException( get_class($this) . ': write operations are not supported' );
        }