Skip to content

Let the shared cache of the core keep the pages that show the highlights - #23

Merged
anoziere merged 4 commits into
mainfrom
feat/shared-cache
Oct 21, 2026
Merged

anoziere merged 4 commits into
mainfrom
feat/shared-cache

Conversation

@anoziere

Copy link
Copy Markdown
Contributor

Declares /api/header-highlights to the shared cache of the public pages added by thelia/thelia#4148. A page that reads the highlights can now be kept by the proxy, tagged header_highlights, and saving or deleting a highlight or its image purges that key.

  • SharedCache/HeaderHighlightsSharedCache implements Thelia\Core\SharedCache\SharedCacheContributorInterface.
  • SharedCache/HeaderHighlightsPurgeListener purges on the Propel post save and post delete events of the four tables, which every write of the configuration screen goes through.
  • Both are registered only when the core has the interface, so on an older core the module behaves as before.
  • Integration test in Tests/Integration, run from the shop root after php bin/test-prepare with vendor/bin/phpunit -c local/modules/HeaderHighlights.
  • Version 2.2.0.

Needs the release of thelia/core that contains thelia/thelia#4148 (SharedCacheContributorInterface and SharedCacheInvalidator are not in 3.2.3): merge after it.

Seen while testing, not changed here: the configuration screen cannot save a block that has no image yet (the insert into header_highlights_image fails on the required file column), and a highlight saved without a call to action breaks every front page (null text given to the button component).

@anoziere
anoziere merged commit 60a7a47 into main Oct 21, 2026
5 checks passed
@anoziere
anoziere deleted the feat/shared-cache branch October 21, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant