Merge "Add cleanup for handlers cache."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 15 Mar 2018 23:48:16 +0000 (23:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 15 Mar 2018 23:48:16 +0000 (23:48 +0000)
includes/content/ContentHandler.php

index eab3afb..3cfac8f 100644 (file)
@@ -332,6 +332,13 @@ abstract class ContentHandler {
                return self::$handlers[$modelId];
        }
 
+       /**
+        * Clean up handlers cache.
+        */
+       public static function cleanupHandlersCache() {
+               self::$handlers = [];
+       }
+
        /**
         * Returns the localized name for a given content model.
         *