Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While working on #2040037: The requested page "/admin/appearance/settings/bartik" could not be found after installation, I noticed that we have system.theme.data and system.*.files as information managed by the Drupal::state() service, and then we put in various workarounds to deal with the fact that that service is unavailable during installation, or the backend might throw an exception. Since this information can be rebuilt at any time from the file system, why is it not in the cache system instead? That would let us remove all those workarounds.
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedAn example of what I mean is this code from drupal_get_filename():
Isn't that silly? This makes it clear that nothing in that state entry is actually state. It's purely cache.
Comment #2
andypost+1 to idea!
Suppose state is a persistent cache storage in the case but the problem with install|update services mostly lives in theme layer.
If this data would be moved to cache so some unpredictable cache clears could bring perf down...