File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
app/code/Magento/Deploy/Model Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -139,16 +139,12 @@ public function regenerateStatic(
139
139
]
140
140
);
141
141
142
- // Cache flush will regenerate needed folders structure for compilation and deploy that were deleted previously
143
- $ cmd = $ this ->functionCallPath . 'cache:flush ' ;
144
- $ this ->shell ->execute ($ cmd );
142
+ $ this ->reinitCacheDirectories ();
145
143
146
144
// Trigger code generation
147
145
$ this ->compile ($ output );
148
146
149
- // Cache flush will regenerate needed folders structure for compilation and deploy that were deleted previously
150
- $ cmd = $ this ->functionCallPath . 'cache:flush ' ;
151
- $ this ->shell ->execute ($ cmd );
147
+ $ this ->reinitCacheDirectories ();
152
148
153
149
// Trigger static assets compilation and deployment
154
150
$ this ->deployStaticContent ($ output );
@@ -344,4 +340,15 @@ public function lockStaticResources()
344
340
self ::PERMISSIONS_FILE
345
341
);
346
342
}
343
+
344
+ /**
345
+ * Flush cache and restore the basic cache directories.
346
+ *
347
+ * @throws LocalizedException
348
+ */
349
+ private function reinitCacheDirectories ()
350
+ {
351
+ $ command = $ this ->functionCallPath . 'cache:flush ' ;
352
+ $ this ->shell ->execute ($ command );
353
+ }
347
354
}
You can’t perform that action at this time.
0 commit comments