Magento – Magento 2 : Flush static files cache delete the files in pub folder

cacheless-cssmagento2

Whenever I click the additional cache management buttons in admin panel , it deletes the files in pub folder.

I don't know what is the reason for this.

Anyone know about this?

please help me.

Best Answer

Additional Cache Management System have three buttons, which are given below.

Flush Catalog Images Cache: Pregenerated product images files

Flush JavaScript/CSS Cache: Themes JavaScript and CSS files combined to one file

Flush Static Files Cache: Preprocessed view files and static files

Now if you click on the last button, it will indeed erase all of your static files. Static files are stored in pub\static\ directory.

So the answer to your question is, it erases the pub\static folder because it is what it's purpose !!!

Sorry, in case you intend anything other.

Related Topic