Review main Merged

63062[FEATURE] Introduce CacheHashConfiguration and matching indicators

Oliver Hader CR +2 V +2 Hard +566 −92 updated 01/31/20, 10:04

Commit message

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]',
  ],
];

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 5