Tax rates, customer groups and currency rates as local entries; a process keeps its entries in memory - #6
Merged
Merged
Conversation
…a process keeps its entries in memory The documents path of a catalog request runs without a select: the rates of a rate request, the group of the visitor and the currency rates come from the local files under the FastBoot version. A tax rule, rate, class or group save cleans the tax entries, a rate import the currency entries. PhpFiles keeps what a process read or wrote until it expires, so a worker answers without the include and a php-fpm request reads an entry once.
A signed-in customer's rate request carries the customer's own address, which would add an entry per address to the cache and the local blobs.
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 🤖:
Three features in the
FastBootmodule, each with a switch:tax_ratesanswers the rate info and the applied rates of a rate request from the cache, keyed as core keys its own per-request memory;customer_groupsanswers a group by id with its tax class and excluded websites, wrapping core's excluded-website plugin so the entry holds its result;currency_ratesanswers a rate or its inverse and cleans on a rate import. The entries live in the default frontend under theFASTBOOT_TAXandFASTBOOT_CURRENCYtags and reach the local files through the default layer. The tax clean plugin moves from the GraphQL module toFastBootasForgetRates; the tag constants live inFastBootCache\Model\Tag.PhpFileskeeps the entries a process read or wrote until they expire. The index path carries the version, so a bump routes around the memory;removeandsweepdrop it. A FrankenPHP worker answers an entry without the include, a php-fpm request reads an entry once.Measured on the documents path of a 200 product listing, warm: the four selects per request are gone (customer group, tax class, excluded websites, tax rates), 29 Redis commands remain, all bootstrap reads before interception, the version token and the schema L1 validation. The parity gate of CatalogStorefront stays at 20 of 20.
A compiled interceptor inlines its plugin chain, so an installation regenerates
generated/codefor the tax calculation resource, the group repository and the currency resource;setup:di:compiledoes that.