Shopware 6

This guide covers integrating smoxy with Shopware 6. It assumes you are using a current version of Shopware 6 — very old versions may not fully support all features described here.

circle-info

Prerequisites: Complete the Getting Started guide first. Your shop's domain must be routed through smoxy.


Cache Tagging (Surrogate Keys)

Shopware 6 supports surrogate keys for efficient cache invalidation. When properly configured, Shopware tells smoxy exactly which cached pages need to be cleared when content changes — instead of flushing the entire cache.

Enable Reverse Proxy Mode

Edit config/packages/storefront.yaml (Shopware 6.6.0+) or config/packages/shopware.yaml:

shopware:
    http_cache:
        reverse_proxy:
            enabled: true
            hosts: ["https://smoxy:<token>@example.com"]
            use_varnish_xkey: true

Replace example.com with your actual shop domain and <token> with the cache token from your site's Basic Configuration.

circle-info

Note: The configuration key changed from storefront.reverse_proxy (up to Shopware 6.5.x) to shopware.http_cache.reverse_proxy (starting with Shopware 6.6.0). Adjust your config when upgrading.

circle-info

Cloudflare users: If you use Cloudflare, you must set up a separate subdomain for cache invalidation. See Cloudflare Setup.

Optimize Cache Hit Rate

Reduce cache tag fragmentation by disabling per-item tags for config, snippets, and themes:

This reduces the number of tags written per page, which leads to fewer unnecessary cache invalidations and a higher cache hit rate.


Multiple Sales Channels

If your Shopware 6 installation uses multiple sales channels with different domains (e.g. country-specific shops), you only need to configure one domain in the reverse proxy hosts setting. Shopware knows which caches to clear for which sales channel and transmits this information to smoxy automatically.

circle-exclamation

Last updated

Was this helpful?