objectcache: micro-optimize determineKeyClassForStats() by using the limit option...
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 27 Apr 2019 04:40:53 +0000 (21:40 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 27 Apr 2019 04:40:53 +0000 (21:40 -0700)
Change-Id: I7d95998487dd18078599b16201c9d0ec0debcb0b

includes/libs/objectcache/WANObjectCache.php

index 8f0b539..dac3421 100644 (file)
@@ -2325,7 +2325,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         * @return string A collection name to describe this class of key
         */
        protected function determineKeyClassForStats( $key ) {
-               $parts = explode( ':', $key );
+               $parts = explode( ':', $key, 3 );
 
                return $parts[1] ?? $parts[0]; // sanity
        }