@@ -875,6 +875,15 @@ public function installDataFixtures(array $request = [])
875875 LayoutCache::TYPE_IDENTIFIER ,
876876 ];
877877
878+ $ cacheManager = $ this ->objectManagerProvider ->get ()->create (\Magento \Framework \App \Cache \Manager::class);
879+ $ disabledCaches = array_filter (
880+ $ cacheManager ->getStatus (),
881+ function ($ value , string $ key ) use ($ frontendCaches ) {
882+ return $ value == false && in_array ($ key , $ frontendCaches );
883+ },
884+ ARRAY_FILTER_USE_BOTH
885+ );
886+
878887 /** @var \Magento\Framework\Registry $registry */
879888 $ registry = $ this ->objectManagerProvider ->get ()->get (\Magento \Framework \Registry::class);
880889 //For backward compatibility in install and upgrade scripts with enabled parallelization.
@@ -888,8 +897,10 @@ public function installDataFixtures(array $request = [])
888897 $ this ->log ->log ('Disabling caches: ' );
889898 $ this ->updateCaches (false , $ frontendCaches );
890899 $ this ->handleDBSchemaData ($ setup , 'data ' , $ request );
891- $ this ->log ->log ('Enabling caches : ' );
900+ $ this ->log ->log ('Enabling Caches : ' );
892901 $ this ->updateCaches (true , $ frontendCaches );
902+ $ this ->log ->log ('Return Disabled Caches to their old state: ' );
903+ $ this ->updateCaches (false , array_keys ($ disabledCaches ));
893904
894905 $ registry ->unregister ('setup-mode-enabled ' );
895906 }
0 commit comments