Search by

stbt / cache-index-package

rofthedeep

Adds two quick-action icons (cache clear, indexer rebuild) to the Shopware admin top bar.

Package info

codeberg.org/stbt/shopware-cache-index-package

Type:shopware-platform-plugin

pkg:composer/stbt/cache-index-package

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

1.0.1 2026-06-02 14:02 UTC

This package is not auto-updated.

Last update: 2026-09-23 14:15:23 UTC


README

Notice — AI-generated code. This plugin was produced with significant help from AI coding agents (Claude / Anthropic). It has been reviewed and tested by a human maintainer, but the maintainer makes no warranty regarding fitness for any particular purpose, and accepts no liability for damages arising from its use. Run it through your own review and testing before deploying to a production environment. See LICENSE for the full MIT terms.

Hinweis — KI-generierter Code. Dieses Plugin wurde mit erheblicher Hilfe von KI-Coding-Agents (Claude / Anthropic) erstellt. Es wurde vom Maintainer geprueft und getestet — der Maintainer uebernimmt jedoch keine Gewaehr fuer die Eignung fuer einen bestimmten Zweck und keine Haftung fuer Schaeden, die aus der Nutzung entstehen. Bitte vor dem Produktiveinsatz selbst pruefen und testen. Volltext siehe LICENSE (MIT).

Two quick-action icons in the Shopware admin top bar:

  • Clear cache — runs cacheApiService.clear() (app cache + container cache)
  • Rebuild index — runs cacheApiService.index([], []) (all DAL indexers)

Both icons sit right before the notification bell. Visibility is gated on the system.clear_cache ACL permission — users without it never see the buttons.

Why

Shopware's built-in cache and index actions live under Settings → System → Caches & Indexes. That's three clicks deep, every time. For developers and shop maintainers who run these dozens of times a day, a top-bar shortcut saves a meaningful amount of friction.

Install

composer require stbt/cache-index-package
bin/console plugin:refresh
bin/console plugin:install --activate StbtCacheIndexPackage
bin/console cache:clear

The admin bundle ships pre-built — no bin/build-administration.sh needed on production.

How it works

Component.override('sw-page', ...) extends the sw_page_notification_center Twig block. The two buttons render inside the standard top-bar action group.

[ search bar ] ... [ trash 🗑 ] [ db 🗄 ] [ bell 🔔 ] [ help ❓ ]

Both buttons:

  • Show a sw-loader spinner during the request
  • Disable themselves to prevent double-clicks
  • Pipe success/error through the standard notification center
  • Use the existing cacheApiService — no custom backend endpoints

Compatibility

ShopwareStatus
6.6should work (untested)
6.7tested
6.8should work (untested)

The override relies on the sw_page_notification_center block name and the cacheApiService.clear() + index() API — both have been stable since Shopware 6.5.

License

MIT