Skip to content

Tax rates, customer groups and currency rates as local entries; a process keeps its entries in memory - #6

Merged
paales merged 6 commits into
mainfrom
node-local-entries
Sep 24, 2026
Merged

paales merged 6 commits into
mainfrom
node-local-entries

Conversation

@paales

@paales paales commented Sep 24, 2026

Copy link
Copy Markdown
Member

Written by 🤖:

Three features in the FastBoot module, each with a switch: tax_rates answers the rate info and the applied rates of a rate request from the cache, keyed as core keys its own per-request memory; customer_groups answers a group by id with its tax class and excluded websites, wrapping core's excluded-website plugin so the entry holds its result; currency_rates answers a rate or its inverse and cleans on a rate import. The entries live in the default frontend under the FASTBOOT_TAX and FASTBOOT_CURRENCY tags and reach the local files through the default layer. The tax clean plugin moves from the GraphQL module to FastBoot as ForgetRates; the tag constants live in FastBootCache\Model\Tag.

PhpFiles keeps the entries a process read or wrote until they expire. The index path carries the version, so a bump routes around the memory; remove and sweep drop 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/code for the tax calculation resource, the group repository and the currency resource; setup:di:compile does that.

…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.
@paales
paales merged commit 2963419 into main Sep 24, 2026
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