Repository navigation
Directory section data from the cache - #11
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.phtml15 to 18 ms → 1.5 ms, two SQL queries fewer, identical HTML. Unit tests: 39 of 39.🤖 Generated with Claude Code