Repository navigation
Keep the GraphQL schema array under the version token of the other local caches - #10
Merged
Merged
Conversation
…cal caches The stitched schema stays a local PHP array that a request includes from OPcache, but it now uses the same storage, version token and write fence as every other FastBoot cache, through Magento's own cache API. It needs no configuration, works on every Magento cache backend and is on by default under the schema_array switch. The separate Redis transport, its settings, its invalidation plugins, its test suites and the Credis requirement are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P4jLu4fTNqMe3WuJern5CW
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.
Problem
The schema array ("schema L1") had its own Redis client, its own keys and its own invalidation plugins. It only ran when
fastboot.schema_l1was configured (enabled plus an installation id), and it needed Redis. Every other FastBoot cache already solved the same problem through Magento's cache API: local PHP files under a version token in Magento's cache, with a fence on each write.Solution
FastBootGraphQl/Model/Config/OpcacheData(the class behindMagento\Framework\GraphQl\Config\Data) now usesPhpFiles(groupSCHEMA, id = the schema cache id):schema_arrayswitch is on and theconfigcache type is enabled, a file hit is merged, and the config cache and the reader are not read.initData()(config cache, or reader plus save) and writes the array with the captured version. A clean on any server during the build makesPhpFilesrefuse the write.A save of a fresh build to the config cache also changes the version. As a result, the request that builds the schema writes no file, and the next request writes it from the config cache. This is why
fastboot:preparealready reads the schema twice. ThePlugin/Schema/Resetversion bump stays. The feature needs no configuration, works on every Magento cache backend and is on by default. An existingfastboot.schema_l1block inenv.phpis not read.Deleted
FastBootCache/Model/Schema/{Settings,Remote,Local,Metrics}.phpFastBootGraphQl/Plugin/Schema/{Invalidate,Flush}.phpand their di.xml wiring, plus theSettingsdi.xml entryfastboot:statuscolinmollenhour/credis(root composer.json) and theext-redissuggestion (FastBootCache)dev/tests/schema-l1/*,dev/tests/without-redis.py, the CI Redis service, the schema and without-redis steps, and the Redis cache backend and schema_l1 block of the CI fixtureSchemaSettingsTest, plus the Settings part ofReleaseTestTests
OpcacheDataTestis rewritten and covers these cases:PhpFiles).PhpFiles).max_entry_bytes.Docs updated: root README, FastBoot, FastBootCache,
dev/ARCHITECTURE.md,dev/README.md,dev/tests/README.md,dev/ci/README.md, CLAUDE.md and CHANGELOG.🤖 Generated with Claude Code
https://claude.ai/code/session_01P4jLu4fTNqMe3WuJern5CW
Generated by Claude Code