Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does --no-debug parameter for the clear:cache command

Tags:

symfony

I want to know, what this --no-debug parameter exactly means? I didn't find any relevant information in the documentation.

Thank you.

like image 637
Silver Zachara Avatar asked Apr 04 '15 16:04

Silver Zachara


1 Answers

There are many uses for the debug parameter. One of the prime examples is during the cache build process. When Symfony writes files to the cache directory, and when debug is enabled, it will create an extra meta file. The contents of this files is a simple list of all the configuration files that were read to create the cache.

When you later change one of the configuration files, Symfony will detect it by comparing the file write time of each resource in the meta file to the file write time of the actual cache data. When a resource is found to be newer than the cache, it marks the cache as being dirty and prompts the framework to rebuild it.

Other uses of debug could include the prompting of a bundle to output log messages, and force a bundle to perform stricter comparisons on any data it may handle.

Basically, the debug parameter allows a developer to perform additional actions during the development process which are not required or too expensive to use in a deployed application.

like image 80
Twifty Avatar answered Nov 25 '22 20:11

Twifty