From 6a8ccf539de52fc95fd3eeee56be674271aa83b9 Mon Sep 17 00:00:00 2001 From: bneumann97 Date: Tue, 7 Jul 2026 11:52:28 +0200 Subject: [PATCH 1/2] docs(filesystem): document use_last_modified_version_strategy option for theme assets --- .wordlist.txt | 1 + guides/hosting/infrastructure/filesystem.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.wordlist.txt b/.wordlist.txt index d717725270..e31f4635de 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -453,6 +453,7 @@ FroshTools Fullstack GBP GCM +GCS GDPR GHSA GIFs diff --git a/guides/hosting/infrastructure/filesystem.md b/guides/hosting/infrastructure/filesystem.md index 3c4b04eed9..ccf43837f7 100644 --- a/guides/hosting/infrastructure/filesystem.md +++ b/guides/hosting/infrastructure/filesystem.md @@ -425,6 +425,22 @@ shopware: batch_write_size: 250 ``` +### Disable last-modified version strategy for theme assets + +By default, Shopware appends a `?` query parameter to every theme asset URL by reading the file's last-modified time from the filesystem. On remote filesystems such as S3 or GCS this triggers an API call per asset per request (cached, but the cache misses still cost round-trips on first use or after a cache flush). + +When the default `SeedingThemePathBuilder` is active — which is the case unless you have explicitly changed `storefront.theme.theme_path_builder_id` — this timestamp suffix is redundant. The path builder already rotates the asset path on every theme compilation, which is the actual cache-invalidation event. You can disable the last-modified lookups entirely: + +```yaml +# config/packages/shopware.yaml +shopware: + filesystem: + theme: + use_last_modified_version_strategy: false +``` + +The option defaults to `true`, so existing installations are unaffected. Set it to `false` on shops with a remote theme filesystem to eliminate the extra metadata calls. + ### Add your own adapter To support a storage backend Shopware does not ship with, create a Flysystem adapter (see the [official Flysystem guide](https://flysystem.thephpleague.com/docs/advanced/creating-an-adapter/)) and wrap it in an `AdapterFactory`: From 3c038cfa4913259d7d7668bfe9906a2c4ba495fb Mon Sep 17 00:00:00 2001 From: Basti <45589752+bneumann97@users.noreply.github.com> Date: Tue, 7 Jul 2026 13:49:20 +0200 Subject: [PATCH 2/2] docs(filesystem): rephrasing Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- guides/hosting/infrastructure/filesystem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/hosting/infrastructure/filesystem.md b/guides/hosting/infrastructure/filesystem.md index ccf43837f7..aa7806fa00 100644 --- a/guides/hosting/infrastructure/filesystem.md +++ b/guides/hosting/infrastructure/filesystem.md @@ -427,7 +427,7 @@ shopware: ### Disable last-modified version strategy for theme assets -By default, Shopware appends a `?` query parameter to every theme asset URL by reading the file's last-modified time from the filesystem. On remote filesystems such as S3 or GCS this triggers an API call per asset per request (cached, but the cache misses still cost round-trips on first use or after a cache flush). +By default, Shopware appends a `?{timestamp}` cache-busting suffix to every theme asset URL by reading the file's last modified time from the filesystem. On remote filesystems such as S3 or GCS (Google Cloud Storage), this can trigger a filesystem metadata call per asset path on cache miss (for example, after a cache flush). When the default `SeedingThemePathBuilder` is active — which is the case unless you have explicitly changed `storefront.theme.theme_path_builder_id` — this timestamp suffix is redundant. The path builder already rotates the asset path on every theme compilation, which is the actual cache-invalidation event. You can disable the last-modified lookups entirely: