We need to efficiently rebuild caches when rebuilding the defaults of exportable entities.
When Rules saves a new configuration, it has to clear its caches in order to update the actions/conditions that are available for a component and/or to update caches for efficient execution of reaction rules or components.
However, any operations running on Rules configuration insert/update that require the rules cache would so trigger rules cache building, whereas the next update would flush the cache again - leading to repeated cache builds and bad performance.
Thus, we need to add a hook that allows modules to efficiently act on configuration mass-updates as occurring when rebuilding defaults in code. The Rules use-case is for rules-i18n at #1422996: localization and i18n integration, which needs to scan for translatable action parameters that have changed and requires the rules-cache to do so.
Comment | File | Size | Author |
---|---|---|---|
#1 | entity_defaults_hook.patch | 2.05 KB | fago |
Comments
Comment #1
fagoattached patch implements the following hook (as added to docs template):
Committed.
Comment #2
fagoComment #3.0
(not verified) CreditAttribution: commentedUpdated issue summary.