feat(core): enable caching for inline JS

This commit is contained in:
alistair3149 2024-05-06 14:06:04 -04:00
parent 58bab74eab
commit 5d59a6d3c0
No known key found for this signature in database

View file

@ -68,8 +68,7 @@ class SkinHooks implements
if ( $this->getConfigValue( 'CitizenEnablePreferences', $out ) === true ) {
$script = file_get_contents( MW_INSTALL_PATH . '/skins/Citizen/resources/skins.citizen.scripts/inline.js' );
$script = Html::inlineScript( $script );
// TODO: Consider turning on cache after this is more stable
$script = RL\ResourceLoader::filter( 'minify-js', $script, [ 'cache' => false ] );
$script = RL\ResourceLoader::filter( 'minify-js', $script );
$out->addHeadItem( 'skin.citizen.inline', $script );
}
}