3

I have a very simple question. Which magento commands cause the removal of

var/cache/ 
var/generation/
var/di/

Folders and which bin/magento commands create them again.

asked Sep 21, 2017 at 12:30
1

2 Answers 2

11

var/cache is cleared by php bin/magento cache:flush. It rebuilds on the fly as data is cached by Magento (there's no command to rebuild, it just happens).

var/di and var/generation are cleared by php bin/magento setup:upgrade, or manually (like executing rm -rf var/di var/generation from site root--be very careful with this!). You can rebuild them by running the command php bin/magento setup:di:compile. If you are in non-production mode, you can leave them and Magento will rebuild the generated sources on the fly (but it'll be a little slower while that happens).

answered Sep 21, 2017 at 12:41
0
0

must be php bin/magento cache:flush command

Manoj Deswal
5,80325 gold badges29 silver badges50 bronze badges
answered Sep 21, 2017 at 13:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.