This page describes commands involved in clearing cache from the command line.
Clearing file cache using the Symfony cache:clear command
Out of the box Symfony provides a command to perform cache clearing. It will delete all file-based caches, which mainly consist of Twig template, Symfony container, and Symfony route cache, but also everything else stored in cache folder. Out of the box on a single-server setup this includes "Content cache". For further information on use, see the help text of the command:
On each web server
In Clustering setup (several web servers), the command to clear file cache needs to be executed on each and every web server!
Clearing "Content Cache" on a Cluster setup
For Cluster setup, the content cache (HTTPCache and Persistent Cache) must be set up to be shared among the servers. And while all relevant cache is cleared for you on repository changes when using the APIs, there might be times where you'll need to clear cache manually:
- Varnish: Purge
- Persistence Cache: Using Cache service