Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/115301

Change subject: Avoid key fragmentation in FileBackend
......................................................................

Avoid key fragmentation in FileBackend

* Make sure that global backends do not prefix the cache keys
  with local wiki IDs for container and file stat entries.
  This causes fragmentation and breaks invalidation.

Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
---
M includes/filebackend/FileBackendStore.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/115301/1

diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index 9a2ebb7..16300af 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1565,7 +1565,7 @@
         * @return string
         */
        private function containerCacheKey( $container ) {
-               return wfMemcKey( 'backend', $this->getName(), 'container', 
$container );
+               return 
"filebackend:{$this->name}:{$this->wikiId}:container:{$container}";
        }
 
        /**
@@ -1646,7 +1646,7 @@
         * @return string
         */
        private function fileCacheKey( $path ) {
-               return wfMemcKey( 'backend', $this->getName(), 'file', sha1( 
$path ) );
+               return "filebackend:{$this->name}:{$this->wikiId}:file:" . 
sha1( $path );
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/115301
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to