You are looking at an older version of this article!

Caches & Indexes

Please note that this article is only for users of a self-hosted store. This is not relevant for users of a Shopware 6 Cloud environment.

In the module Caches & Indexes you are able to empty and warm up the cache. It also gives you an overview of some system configurations.

Configuration overview

In the overview you will get the information whether your shop is used in productive mode. This is indicated by the entry "Production" in the Environment (1).
You can also see here whether the HTTP cache is active (2) and which cache adapter (3) is used.

You can adjust the environment mode and HTTP cache in the .env file in the Shopware main directory.
For more information on how to customize the environment settings, click here.


activated. (=0) deactivates the cache.

Manage Caches & Indexes

In the lower part of the module you have different functions for the cache and the indexes.

  • Clear caches (4)
    This can be used to empty the caches without having to reheat them directly afterwards.
    This is also available in the console.
    php bin/console cache:clear
  • Clear and warm up caches (5)
    First a new cache is created. The old cache is removed after the new cache has been created.
  • Indexes (6)
    Updates the indexes such as the category and product indexes and the SEO URLs.
    In the console, this can be done using the command
    php bin/console dal:refresh:index

Empty cache automatically

In Shopware 6 Standard the cache is not automatically emptied. In the long run, this can lead to the store installation becoming larger and larger and requiring more and more memory on the server.

To empty the cache of the store manually once, the following command can be used in the admin console. 

rm -rf SHOPWARE-ROOT-DIRECTORY/var/cache/*

To avoid having to execute this command manually at regular intervals, we recommend to execute it once a day via cronjob. This can be done at night when the traffic on the store is lowest. 

How you can set up a regular cronjob on a Linux server, you can read here.  

Was this article helpful?