api4 - Enable services
[civicrm-core.git] / Civi / Core / Container.php
index 9c78f0b3126c57686e909977d6b8125c30a56293..805056456188bff234a10211371f26eb5bbb0244 100644 (file)
@@ -159,6 +159,8 @@ class Container {
       'navigation' => 'navigation',
       'customData' => 'custom data',
       'fields' => 'contact fields',
+      'contactTypes' => 'contactTypes',
+      'metadata' => 'metadata',
     ];
     foreach ($basicCaches as $cacheSvc => $cacheGrp) {
       $definitionParams = [
@@ -168,7 +170,7 @@ class Container {
       // For Caches that we don't really care about the ttl for and/or maybe accessed
       // fairly often we use the fastArrayDecorator which improves reads and writes, these
       // caches should also not have concurrency risk.
-      $fastArrayCaches = ['groups', 'navigation', 'customData', 'fields'];
+      $fastArrayCaches = ['groups', 'navigation', 'customData', 'fields', 'contactTypes', 'metadata'];
       if (in_array($cacheSvc, $fastArrayCaches)) {
         $definitionParams['withArray'] = 'fast';
       }
@@ -311,6 +313,7 @@ class Container {
     if (\CRM_Utils_Constant::value('CIVICRM_FLEXMAILER_HACK_SERVICES')) {
       \Civi\Core\Resolver::singleton()->call(CIVICRM_FLEXMAILER_HACK_SERVICES, [$container]);
     }
+    \CRM_Api4_Services::hook_container($container);
 
     \CRM_Utils_Hook::container($container);