Use consistent caching strategy in Revision storage classes
[lhc/web/wiklou.git] / includes / externalstore / ExternalStoreDB.php
index 45a6baf..422e1fb 100644 (file)
@@ -194,6 +194,10 @@ class ExternalStoreDB extends ExternalStoreMedium {
                static $externalBlobCache = [];
 
                $cacheID = ( $itemID === false ) ? "$cluster/$id" : "$cluster/$id/";
+
+               $wiki = $this->params['wiki'] ?? false;
+               $cacheID = ( $wiki === false ) ? $cacheID : "$cacheID@$wiki";
+
                if ( isset( $externalBlobCache[$cacheID] ) ) {
                        wfDebugLog( 'ExternalStoreDB-cache',
                                "ExternalStoreDB::fetchBlob cache hit on $cacheID" );