New in Symfony 3.3: Deprecated cache clear with warmup

This blog post explained a change that was reverted before the release of Symfony 3.3. That's why the original blog post content has been removed. You can keep using the cache:clear and cache:warmup commands as usual:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# warmup the existing cache but don't clear it
$ ./bin/console cache:warmup (--env=prod|dev)
# in modern Symfony apps:
# APP_ENV=prod|dev ./bin/console cache:warmup

# clear the existing cache and warm it up
$ ./bin/console cache:clear (--env=prod|dev)
# in modern Symfony apps:
# APP_ENV=prod|dev ./bin/console cache:clear

# clear the existing cache but don't warm it up
$ ./bin/console cache:clear --no-warmup (--env=prod|dev)
# in modern Symfony apps:
# APP_ENV=prod|dev ./bin/console cache:clear --no-warmup

Comments

"warmup it" could be replaced by and "warm it up" to be more correct ;)
By the way, I think it's a nice idea, because cache clear is sometimes long because of warmup systematic execution, so it's nice that it's removed from cache:clear :)
Can anyone explain the differences between the two methods of warming up?
@Alex thanks for the heads up! It's fixed now.
Can anybody point to some issues with "cache:clear" now warming up properly?
If I change the configuration of a running application, than "cache:clear" with warmup was very useful, because it first creates a shadow cache (based on the new configuration) before deleting the cache. So the switch was an atomic operation. Would this also possible with the new command?
Is this also going to be changed on "\Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache" ?

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.