The root cause [IIRC] for introducing
SchemaCache (or rather its D7 equivalent) was
Avoid to load .install files, because they can be big, and we need the table schema info all over the place.
— But in D8, database table schema information should not be needed anymore.
Only the installer + module install/uninstall should need it. In addition, work is actively ongoing to remove schema definitions for entity type base tables from
hook_schema() and derive that info from the base field definitions instead.
→ Drop the schema cache altogether and just simply load the .install file of the requested module + invoke its
hook_install() at all times.
→ Convert schema.inc into a trivial new Schema class/service.
The primary blockers/offenders are:
For (1), I created
drupal_write_record() is definitely replaced by all the (base) field work in D8.
The vast majority of calls to (2) are tests.
The calls to (3) are almost exclusively originating from Entity/Field code. @tstoeckler + @andypost + Co are currently working to fill in some last remaining gaps in that space, with the goal of completely replacing
hook_install() for all entity types, since the information can be derived from base field definitions.
Instead of a manually curated table here, please refer to the list of child issues in the sidebar →