diff --git a/wp-includes/class-wp-textdomain-registry.php b/wp-includes/class-wp-textdomain-registry.php index 113ef3bd65..fe6d04b0a1 100644 --- a/wp-includes/class-wp-textdomain-registry.php +++ b/wp-includes/class-wp-textdomain-registry.php @@ -183,8 +183,8 @@ class WP_Textdomain_Registry { return $files; } - $cache_key = 'cached_mo_files_' . md5( $path ); - $files = wp_cache_get( $cache_key, 'translations' ); + $cache_key = md5( $path ); + $files = wp_cache_get( $cache_key, 'translation_files' ); if ( false === $files ) { $files = glob( $path . '*.mo' ); @@ -197,7 +197,7 @@ class WP_Textdomain_Registry { $files = array_merge( $files, $php_files ); } - wp_cache_set( $cache_key, $files, 'translations' ); + wp_cache_set( $cache_key, $files, 'translation_files', HOUR_IN_SECONDS ); } return $files; @@ -246,13 +246,13 @@ class WP_Textdomain_Registry { foreach ( $translation_types as $type ) { switch ( $type ) { case 'plugin': - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins/' ), 'translations' ); + wp_cache_delete( md5( WP_LANG_DIR . '/plugins/' ), 'translation_files' ); break; case 'theme': - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/themes/' ), 'translations' ); + wp_cache_delete( md5( WP_LANG_DIR . '/themes/' ), 'translation_files' ); break; default: - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/' ), 'translations' ); + wp_cache_delete( md5( WP_LANG_DIR . '/' ), 'translation_files' ); break; } } diff --git a/wp-includes/load.php b/wp-includes/load.php index 40947a0b20..b7bde142ec 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -876,6 +876,7 @@ function wp_start_object_cache() { 'site-queries', 'site-transient', 'theme_files', + 'translation_files', 'rss', 'users', 'user-queries', diff --git a/wp-includes/version.php b/wp-includes/version.php index 1762e61805..8f4665984d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57829'; +$wp_version = '6.6-alpha-57831'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.