The cache is a buffer for database queries, template files and snippets and is used to boost performance. Cached data does not require further query in the database.
The central Cache/Performance module can be found under Configuration in the backend. This is divided into three areas:
Shopware 5 introduced a simplified means of cache management. The system now creates a separate directory every time a revision is made (including staging environments). This means with an update, Shopware automatically creates and uses the new folder, while the previous folder is archived.
The Start tab contains the following modes to simplify the cache handling in shopware.
Here the SSI optimization methods are displayed.
These are only suggestions for optimization. Omitting optional settings has no effect on Shopware's functionality.
The HTTP cache comes as a default feature of Shopware. In order for it to be used, it must first be activated in the backend.
The http-cache can be completely warmed up using the Cache Warmer. In simple terms, this means that all pages of the shop are called once and loaded into the cache. If this did not happen using the Cache Warmer, the cache would build up when a user visits the shop, resulting in a considerably longer load time. To save the user this waiting time, you can warm up the cache yourself.
If the HTTP cache is active, you can warm it up using the blue "Warm up cache" button. Click on the button and select the desired shop in the popup that opens and click on "Start process". The cache will then be warmed up.
Batch size: This is the number of calls processed by the server.
Concurrency: Select here how many processes should work in parallel on the cache warmup. Depending on the server, more or less parallel processes can be useful, just test here which setting delivers the fastest results.
Advanced settings: Here you can define which pages of your shop should be warmed up. Click "Save as default" to save the current configuration for future use.
Activating and configuring the HTTP cache
In the backend, go to Configuration > Cache/performance and switch to the Settings tab. In the directory labeled General, find the subdirectory HTTP cache.
By clicking the checkbox next to Activate HTTP cache, the plugin will handle all caching from this point forward.
Additional configuration options like the cache invalidation, alternate proy URLs and the admin view can also be found here.
Defining cache times
For further information, see our developers documentation about HTTP cache.
Please note that the cache function isn’t compatible with scrolling functions on the product detail page. This applies only if you change the sorting in the category view (i.e. from sorting by price to date of creation). The sorting is ignored if you open a product in the overview then click the “Next” button.
Here you can rebuild the theme cache. After rebuilding the theme cache, the HTTP cache will be cleared.
Here you can define the cache strategies for SEO friendly URLs. The default setting is Live. This setting determines how URLs are dynamically updated and created. The process here is identical to previous versions of Shopware. There are Manual and Cronjob strategies for this. The automatic generation of SEO URLs is deactivated with this setting. URLs are only updated by cronjob (i.e. evenings) or manually. Manual updating is performed by clicking the button in this window. The URLs can then be handled for the desired shop completely via batch processing.
Here the update strategies of the search indexes can be defined. This setting determines how often the search index is recreated (by calling the search in the frontend). The process here is identical to previous versions of Shopware. There are Manual and Cronjob strategies for this. The automatic generation of SEO URLs is deactivated with this setting. The search index is only updated by cronjob (i.e. evenings) or manually. Manual updating is performed by clicking the button in this window.