Skip to content
Snippets Groups Projects
Commit cd7cfb55 authored by Oliver Hader's avatar Oliver Hader Committed by Susanne Moog
Browse files

[FEATURE] Introduce CacheHashConfiguration and matching indicators

Settings for $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash'] are modelled
in CacheHashConfiguration which takes care of validating configuration.
It also determines whether corresponding aspects apply to a given URL
parameter.

Besides exact matches (equals) it is possible to apply partial matches at
the beginning of a parameter (startsWith) or inline occurrences (contains).

URL parameter names are prefixed with the following indicators:
+ = (equals): exact match, default behavior if not given
+ ^ (startsWith): matching the beginning of a parameter name
+ ~ (contains): matching any inline occurrence in a parameter name

These indicators can be used for all previously existing sub-properties
'cachedParametersWhiteList', 'excludedParameters', 'excludedParametersIfEmpty'
and 'requireCacheHashPresenceParameters'.

Example:
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash'] = [
  'excludedParameters' => [
    'utm_source',
    'utm_medium',
    '^utm_', // making previous two obsolete
  ],
  'excludedParametersIfEmpty' => [
    '^tx_my_plugin[aspects]',
    'tx_my_plugin[filter]',
  ],
];

Resolves: #90234
Releases: master
Change-Id: I16d316e463b7c94c5eb75069f8c24ffde135d080
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63062


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
parent 486fa5ee
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment