diff --git a/initialise/MirahezeFunctions.php b/initialise/MirahezeFunctions.php index cdc2eccf41..168eb99e16 100644 --- a/initialise/MirahezeFunctions.php +++ b/initialise/MirahezeFunctions.php @@ -574,7 +574,9 @@ public static function writeToCache( string $cacheShard, array $configObject ): if ( $tmpFile !== false ) { $contents = StaticArrayWriter::write( $configObject, 'Automatically generated by MirahezeFunctions' ); if ( file_put_contents( $tmpFile, $contents ) ) { - if ( rename( $tmpFile, self::CACHE_DIRECTORY . '/' . $cacheShard ) ) { + $targetFile = self::CACHE_DIRECTORY . '/' . $cacheShard; + if ( rename( $tmpFile, $targetFile ) ) { + opcache_invalidate( $targetFile, true ); return; } }