Skip to content

Directory section data from the cache - #11

Merged
paales merged 1 commit into
mainfrom
directory-section-data
Oct 20, 2026
Merged

paales merged 1 commit into
mainfrom
directory-section-data

Conversation

@deployyy-platform

Copy link
Copy Markdown

Written by Claude Code:

New switch directory_data: Magento\Checkout\CustomerData\DirectoryData::getSectionData() per store view from the cache, under the config and translate tags. Core selects the regions and the countries and looks up each country name on every call; Hyvä renders this section inline on every page through its default section data. Core keeps its region JSON under the config tag the same way.

Measured on a Hyvä category page (production mode): default-section-data.phtml 15 to 18 ms → 1.5 ms, two SQL queries fewer, identical HTML. Unit tests: 39 of 39.

🤖 Generated with Claude Code

… cache, so a theme that inlines the default section data on every page, such as Hyvä, no longer selects the regions and countries and looks up every country name on each request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paales
paales merged commit 0d2a939 into main Oct 20, 2026
6 checks passed
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