-
Notifications
You must be signed in to change notification settings - Fork 40
Open
backdrop/backdrop
#5156Milestone
Description
Description of the need
The ability to cache configuration files in memory is poorly documented and in some ways "hidden", in that it does not have any way to enable/disable it other than to know the special key _config_static in config files. We've run into several places in core where this flag is misconfigured or misunderstood:
- Sites upgraded from Drupal 7 to Backdrop missing _config_static true in json files. #6982
- Enable Static Caching on system.date.json #5800
- Is config() cached? #856
- Site constantly reporting ConfigStorageReadException fatal errors under load. #6961
Proposed solution
We should introduce an API for setting this special flag, which will provide a location to document how and why to use it. It's also an opportunity to expand test coverage.
Draft of feature description for Press Release (1 paragraph at most)
The API for configuration management now includes methods for enabling and disabling in-memory caching. While the cache is not new, the new APIs provide documentation and make it easier for modules to enable configuration caching.