From b99066b03d6fc6fc6fe456d35d9285b1c50b67b0 Mon Sep 17 00:00:00 2001 From: Thorsten Reiter <34274688+reithor@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:13:22 +0100 Subject: [PATCH] IBX-7015: Fixed Content Type cache_keys For more details see https://issues.ibexa.co/browse/IBX-7015 and https://github.com/ezsystems/ezplatform-kernel/pull/392 --- eZ/Publish/Core/Persistence/Cache/ContentTypeHandler.php | 7 ++++--- eZ/Publish/Core/settings/storage_engines/cache.yml | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/eZ/Publish/Core/Persistence/Cache/ContentTypeHandler.php b/eZ/Publish/Core/Persistence/Cache/ContentTypeHandler.php index 0f10261d85..befe75dfb5 100644 --- a/eZ/Publish/Core/Persistence/Cache/ContentTypeHandler.php +++ b/eZ/Publish/Core/Persistence/Cache/ContentTypeHandler.php @@ -26,9 +26,10 @@ class ContentTypeHandler extends AbstractInMemoryPersistenceHandler implements C private const TYPE_IDENTIFIER = 'type'; private const TYPE_GROUP_IDENTIFIER = 'type_group'; private const CONTENT_TYPE_IDENTIFIER = 'content_type'; + private const CONTENT_TYPE_WITH_ID_SUFFIX_IDENTIFIER = 'content_type_with_id_suffix'; + private const CONTENT_TYPE_WITH_BY_REMOTE_SUFFIX_IDENTIFIER = 'content_type_with_by_remote_suffix'; private const CONTENT_TYPE_GROUP_IDENTIFIER = 'content_type_group'; private const CONTENT_TYPE_GROUP_WITH_ID_SUFFIX_IDENTIFIER = 'content_type_group_with_id_suffix'; - private const CONTENT_TYPE_GROUP_WITH_BY_REMOTE_SUFFIX_IDENTIFIER = 'content_type_group_with_by_remote_suffix'; private const CONTENT_TYPE_GROUP_LIST_IDENTIFIER = 'content_type_group_list'; private const BY_IDENTIFIER_SUFFIX = 'by_identifier_suffix'; private const CONTENT_TYPE_LIST_BY_GROUP_IDENTIFIER = 'content_type_list_by_group'; @@ -83,12 +84,12 @@ protected function init(): void $this->cacheIdentifierGenerator->generateKey(self::CONTENT_TYPE_IDENTIFIER, [$type->id], true), $this->cacheIdentifierGenerator->generateKey(self::CONTENT_TYPE_IDENTIFIER, [$type->id], true) . '-' . $status, $this->cacheIdentifierGenerator->generateKey( - self::CONTENT_TYPE_GROUP_WITH_ID_SUFFIX_IDENTIFIER, + self::CONTENT_TYPE_WITH_ID_SUFFIX_IDENTIFIER, [$this->cacheIdentifierSanitizer->escapeForCacheKey($type->identifier)], true ), $this->cacheIdentifierGenerator->generateKey( - self::CONTENT_TYPE_GROUP_WITH_BY_REMOTE_SUFFIX_IDENTIFIER, + self::CONTENT_TYPE_WITH_BY_REMOTE_SUFFIX_IDENTIFIER, [$this->cacheIdentifierSanitizer->escapeForCacheKey($type->remoteId)], true ), diff --git a/eZ/Publish/Core/settings/storage_engines/cache.yml b/eZ/Publish/Core/settings/storage_engines/cache.yml index 18801bc09d..ca5b329eb9 100644 --- a/eZ/Publish/Core/settings/storage_engines/cache.yml +++ b/eZ/Publish/Core/settings/storage_engines/cache.yml @@ -24,10 +24,11 @@ parameters: content_version_list: 'c-%s-vl' content_version: 'c-%%s-v-%%s' content_type: 'ct-%s' + content_type_with_by_remote_suffix: 'ct-%s-br' + content_type_with_id_suffix: 'ct-%s-bi' content_type_field_map: 'ctfm' content_type_group: 'ctg-%s' content_type_group_with_id_suffix: 'ctg-%s-bi' - content_type_group_with_by_remote_suffix: 'ctg-%s-br' content_type_group_list: 'ctgl-%s' content_type_list_by_group: 'ctlbg-%s' image_variation: 'ig' @@ -119,10 +120,11 @@ parameters: content_version_list: 'c-%s-vl' content_version: 'c-%%s-v-%%s' content_type: 'ct-%s' + content_type_with_by_remote_suffix: 'ct-%s-br' + content_type_with_id_suffix: 'ct-%s-bi' content_type_field_map: 'ctfm' content_type_group: 'ctg-%s' content_type_group_with_id_suffix: 'ctg-%s-bi' - content_type_group_with_by_remote_suffix: 'ctg-%s-br' content_type_group_list: 'ctgl-%s' content_type_list_by_group: 'ctlbg-%s' image_variation: 'ig'