From f5f2233daa1de337e35e7322c60cfb722d043988 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 24 Feb 2014 13:22:15 -0800 Subject: [PATCH] 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 --- includes/filebackend/FileBackendStore.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 9a2ebb7188..16300af3ae 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -1565,7 +1565,7 @@ abstract class FileBackendStore extends FileBackend { * @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 @@ abstract class FileBackendStore extends FileBackend { * @return string */ private function fileCacheKey( $path ) { - return wfMemcKey( 'backend', $this->getName(), 'file', sha1( $path ) ); + return "filebackend:{$this->name}:{$this->wikiId}:file:" . sha1( $path ); } /** -- 2.20.1