- Issue created by @catch
Follow-up from π Single directory component CSS asset library not picked up in admin theme immediately after module install without cache clear Active .
ModuleInstaller::instal() and drupal_flush_all_caches() both manually call various service cache clearing methods, such as \Drupal::getContainer()->get('plugin.cache_clearer')->clearCachedDefinitions();
Module install doesn't call drupal_flush_all_caches() because it tries to be selective about which caches it clears to avoid cold starts, so we have duplicated and subtly different logic between the two.
For module install, we could have a service tag + interface, so that plugin.cache_clearer and library.discovery can subscribe to the tag and have their caches cleared automatically. We could also do the same thing in drupal_flush_all_caches().
Not sure if we also need a 'flush all caches' tag for the things that are different too.
Active
11.0 π₯
Last updated