#107546Streamline `SchemaInformation` cache handling
Description
During introducing the native json field support the custom
internal `SchemaInformation` has been implemented [1], which
was required to provide a cache layer to reduce costs related
to database schema lookups in a handfull of places.
The cache layer has been changed from core cache to a dedicated
`database_schema` cache to use the VariableFrontend per default,
using `serialize/deserialize` under the hood [2].
Trying to replace costly database schema calls in TYPO3 [3]
revealed an issue caching Doctrine DBAL schema objects and
has been reverted [4].
Further investigation revealed, that we only need specific
subset of schema information in the several places of our
beloved CMS, nailed down to:
- list table names of a database connection
- list table column names for a database of a connection
- list table columns to get information required to make
decision how to process things in a handfull of places.
`SchemaInformation` was never ment to provide a complete
cached replacement for the database schema methods provided
by `AbstractSchemaManager` from Doctrine DBAL, the goal
was to only have necessary data cached to reduce database
queries to slow schema information tables.
[1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/76553
2 https://review.typo3.org/c/Packages/TYPO3.CMS/+/79148
3 https://review.typo3.org/c/Packages/TYPO3.CMS/+/90562
4 https://review.typo3.org/c/Packages/TYPO3.CMS/+/90588
Reviews 5
- main 90566[WIP][TASK] Warmup database cache listening to `CacheWarmupEvent`
- 13.4 90950[TASK] Use `runtime` cache in `SchemaInformation` as 2nd level cache
- main 90563[TASK] Use `runtime` cache in `SchemaInformation` as 2nd level cache
- 13.4 90947[TASK] Streamline `SchemaInformation` cache handling
- main 90786[TASK] Streamline `SchemaInformation` cache handling
Related issues 7
- Feature #99062Native JSON field support in Doctrine DBAL
- Bug #100925Improve database schema cache
- Task #107390Avoid costly database schema queries and class state
- Bug #107406Revert "Avoid costly database schema queries and class state"
- Task #107610Introduce `runtime` cache to `SchemaInformation`
- Task #107612Warmup database cache listening to `CacheWarmupEvent`
- Bug #108615DatabaseRowsUpdateWizard is so slow