Skip to content

Commit

Permalink
[BUGFIX] Use checksum of frontend groups in cache identifier
Browse files Browse the repository at this point in the history
The generated cache identifier may get very long in case a page has many
frontend groups configured and may exceeds the limit of the caching
frontend (which is 250 characthers per definition in
FrontendInterface::PATTERN_ENTRYIDENTIFIER). To bypass this issue, the
group list is hashed now.

Resolves: #91413
Related: #91208
Releases: master, 9.5
Change-Id: Id44ae862eb5d45afbd49dc3f833c101c6acb5f5b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64512
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Frank W Blank <blank@wiro-consultants.com>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
  • Loading branch information
andreaskienast authored and bnf committed May 18, 2020
1 parent 2ce81ab commit 4d15cf2
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1398,7 +1398,7 @@ public function getMultipleGroupsWhereClause($field, $table)
$userAspect = $this->context->getAspect('frontend.user');
$memberGroups = $userAspect->getGroupIds();
$cache = $this->getRuntimeCache();
$cacheIdentifier = 'PageRepository_groupAccessWhere_' . str_replace('.', '_', $field) . '_' . $table . '_' . implode('_', $memberGroups);
$cacheIdentifier = 'PageRepository_groupAccessWhere_' . md5($field . '_' . $table . '_' . implode('_', $memberGroups));
$cacheEntry = $cache->get($cacheIdentifier);
if ($cacheEntry) {
return $cacheEntry;
Expand Down

0 comments on commit 4d15cf2

Please sign in to comment.