Merge "FauxRequest: don’t override getValues()"
[lhc/web/wiklou.git] / includes / resourceloader / MessageBlobStore.php
index 457648a..b4f0b7c 100644 (file)
@@ -27,10 +27,13 @@ use Psr\Log\NullLogger;
 use Wikimedia\Rdbms\Database;
 
 /**
- * This class generates message blobs for use by ResourceLoader modules.
+ * This class generates message blobs for use by ResourceLoader.
  *
- * A message blob is a JSON object containing the interface messages for a certain module in
- * a certain language.
+ * A message blob is a JSON object containing the interface messages for a
+ * certain module in a certain language.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
  */
 class MessageBlobStore implements LoggerAwareInterface {
 
@@ -177,7 +180,7 @@ class MessageBlobStore implements LoggerAwareInterface {
                // - This global check key invalidates message blobs for all modules for all wikis
                //   in cache contexts (e.g. languages, skins). Setting a hold-off on this key could
                //   cause a cache stampede since no values would be stored for several seconds.
-               $cache->touchCheckKey( $cache->makeGlobalKey( __CLASS__ ), $cache::HOLDOFF_NONE );
+               $cache->touchCheckKey( $cache->makeGlobalKey( __CLASS__ ), $cache::HOLDOFF_TTL_NONE );
        }
 
        /**
@@ -224,7 +227,7 @@ class MessageBlobStore implements LoggerAwareInterface {
                        }
                }
 
-               $json = FormatJson::encode( (object)$messages );
+               $json = FormatJson::encode( (object)$messages, false, FormatJson::UTF8_OK );
                // @codeCoverageIgnoreStart
                if ( $json === false ) {
                        $this->logger->warning( 'Failed to encode message blob for {module} ({lang})', [