Loading core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php +15 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,13 @@ class EntityLastInstalledSchemaRepository implements EntityLastInstalledSchemaRe */ protected $entityTypeDefinitions = NULL; /** * The loaded installed field storage definitions. * * @var array|null */ protected $entityFieldStorageDefinitions = NULL; /** * Constructs a new EntityLastInstalledSchemaRepository. * Loading Loading @@ -117,10 +124,15 @@ public function deleteLastInstalledDefinition($entity_type_id) { * {@inheritdoc} */ public function getLastInstalledFieldStorageDefinitions($entity_type_id) { if (isset($this->entityFieldStorageDefinitions[$entity_type_id])) { return $this->entityFieldStorageDefinitions[$entity_type_id]; } if ($cache = $this->cacheBackend->get($entity_type_id . '.field_storage_definitions.installed')) { $this->entityFieldStorageDefinitions[$entity_type_id] = $cache->data; return $cache->data; } $definitions = $this->keyValueFactory->get('entity.definitions.installed')->get($entity_type_id . '.field_storage_definitions', []); $this->entityFieldStorageDefinitions[$entity_type_id] = $definitions; $this->cacheBackend->set($entity_type_id . '.field_storage_definitions.installed', $definitions, Cache::PERMANENT); return $definitions; } Loading @@ -130,6 +142,7 @@ public function getLastInstalledFieldStorageDefinitions($entity_type_id) { */ public function setLastInstalledFieldStorageDefinitions($entity_type_id, array $storage_definitions) { $this->keyValueFactory->get('entity.definitions.installed')->set($entity_type_id . '.field_storage_definitions', $storage_definitions); unset($this->entityFieldStorageDefinitions[$entity_type_id]); $this->cacheBackend->delete($entity_type_id . '.field_storage_definitions.installed'); } Loading @@ -138,6 +151,7 @@ public function setLastInstalledFieldStorageDefinitions($entity_type_id, array $ */ public function setLastInstalledFieldStorageDefinition(FieldStorageDefinitionInterface $storage_definition) { $entity_type_id = $storage_definition->getTargetEntityTypeId(); unset($this->entityFieldStorageDefinitions[$entity_type_id]); $definitions = $this->getLastInstalledFieldStorageDefinitions($entity_type_id); $definitions[$storage_definition->getName()] = $storage_definition; $this->setLastInstalledFieldStorageDefinitions($entity_type_id, $definitions); Loading @@ -150,6 +164,7 @@ public function deleteLastInstalledFieldStorageDefinition(FieldStorageDefinition $entity_type_id = $storage_definition->getTargetEntityTypeId(); $definitions = $this->getLastInstalledFieldStorageDefinitions($entity_type_id); unset($definitions[$storage_definition->getName()]); unset($this->entityFieldStorageDefinitions[$entity_type_id]); $this->setLastInstalledFieldStorageDefinitions($entity_type_id, $definitions); } Loading core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -129,11 +129,11 @@ protected function doTestNodePageAdministrator(): void { $expected = [ 'QueryCount' => 304, 'CacheGetCount' => 324, 'CacheGetCount' => 311, 'CacheGetCountByBin' => [ 'config' => 66, 'bootstrap' => 16, 'discovery' => 108, 'discovery' => 95, 'data' => 23, 'entity' => 25, 'dynamic_page_cache' => 1, Loading core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ protected function testFrontPageColdCache(): void { $expected = [ 'QueryCount' => 219, 'CacheGetCount' => 289, 'CacheGetCount' => 277, 'CacheSetCount' => 295, 'CacheDeleteCount' => 0, 'CacheTagLookupQueryCount' => 25, Loading Loading
core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php +15 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,13 @@ class EntityLastInstalledSchemaRepository implements EntityLastInstalledSchemaRe */ protected $entityTypeDefinitions = NULL; /** * The loaded installed field storage definitions. * * @var array|null */ protected $entityFieldStorageDefinitions = NULL; /** * Constructs a new EntityLastInstalledSchemaRepository. * Loading Loading @@ -117,10 +124,15 @@ public function deleteLastInstalledDefinition($entity_type_id) { * {@inheritdoc} */ public function getLastInstalledFieldStorageDefinitions($entity_type_id) { if (isset($this->entityFieldStorageDefinitions[$entity_type_id])) { return $this->entityFieldStorageDefinitions[$entity_type_id]; } if ($cache = $this->cacheBackend->get($entity_type_id . '.field_storage_definitions.installed')) { $this->entityFieldStorageDefinitions[$entity_type_id] = $cache->data; return $cache->data; } $definitions = $this->keyValueFactory->get('entity.definitions.installed')->get($entity_type_id . '.field_storage_definitions', []); $this->entityFieldStorageDefinitions[$entity_type_id] = $definitions; $this->cacheBackend->set($entity_type_id . '.field_storage_definitions.installed', $definitions, Cache::PERMANENT); return $definitions; } Loading @@ -130,6 +142,7 @@ public function getLastInstalledFieldStorageDefinitions($entity_type_id) { */ public function setLastInstalledFieldStorageDefinitions($entity_type_id, array $storage_definitions) { $this->keyValueFactory->get('entity.definitions.installed')->set($entity_type_id . '.field_storage_definitions', $storage_definitions); unset($this->entityFieldStorageDefinitions[$entity_type_id]); $this->cacheBackend->delete($entity_type_id . '.field_storage_definitions.installed'); } Loading @@ -138,6 +151,7 @@ public function setLastInstalledFieldStorageDefinitions($entity_type_id, array $ */ public function setLastInstalledFieldStorageDefinition(FieldStorageDefinitionInterface $storage_definition) { $entity_type_id = $storage_definition->getTargetEntityTypeId(); unset($this->entityFieldStorageDefinitions[$entity_type_id]); $definitions = $this->getLastInstalledFieldStorageDefinitions($entity_type_id); $definitions[$storage_definition->getName()] = $storage_definition; $this->setLastInstalledFieldStorageDefinitions($entity_type_id, $definitions); Loading @@ -150,6 +164,7 @@ public function deleteLastInstalledFieldStorageDefinition(FieldStorageDefinition $entity_type_id = $storage_definition->getTargetEntityTypeId(); $definitions = $this->getLastInstalledFieldStorageDefinitions($entity_type_id); unset($definitions[$storage_definition->getName()]); unset($this->entityFieldStorageDefinitions[$entity_type_id]); $this->setLastInstalledFieldStorageDefinitions($entity_type_id, $definitions); } Loading
core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -129,11 +129,11 @@ protected function doTestNodePageAdministrator(): void { $expected = [ 'QueryCount' => 304, 'CacheGetCount' => 324, 'CacheGetCount' => 311, 'CacheGetCountByBin' => [ 'config' => 66, 'bootstrap' => 16, 'discovery' => 108, 'discovery' => 95, 'data' => 23, 'entity' => 25, 'dynamic_page_cache' => 1, Loading
core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ protected function testFrontPageColdCache(): void { $expected = [ 'QueryCount' => 219, 'CacheGetCount' => 289, 'CacheGetCount' => 277, 'CacheSetCount' => 295, 'CacheDeleteCount' => 0, 'CacheTagLookupQueryCount' => 25, Loading