From: Aaron Schulz Date: Mon, 24 Feb 2014 21:22:15 +0000 (-0800) Subject: Avoid key fragmentation in FileBackend X-Git-Tag: 1.31.0-rc.0~16833^2 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=f5f2233daa1de337e35e7322c60cfb722d043988;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ); } /**