Search code examples
phpsymfonyrm

Difference between the two methods of clearing cache in symfony


There are two methods we can clear cache in symfony application:

app/console cache:clear [--env=prod]

&

rm -rf app/cache/*

What is the difference between the two ?


Solution

  • Command app/console cache:clear deletes the cache directory as well as rm but it also runs warmup phase, where it re-creates cache fiels so I doesn't need to be created by the first request that arrives (see no-warmup option).