Customize TYPO3's cache hash using TypoScript.
With Composer composer req pixelant/cachehash
.
Then enable the extension in TYPO3.
New parameters for the cache hash is added to the TypoScript property config.tx_cachehash.parameters
Each parameter will be parsed using stdWrap.
Existing parameters are available in the data array (e.g. field = gr_list
).
Available parameters from TYPO3 are:
id
– The page IDtype
– The render typegr_list
– Comma separated list of groupsMP
– Mount pointsiteBase
– Base for the current languagecHash
– cHash arraystaticRouteArguments
– ArgumentsdomainStartPage
– ID of the site root
This adds the current request domain to the cache hash:
config.tx_cachehash.parameters.domain {
data = getEnv:HTTP_HOST
}
This overwrites the existing parameter type
witht he static string "blah". This will probably cause problems.
config.tx_cachehash.parameters.type = blah
This wraps the domainStartPage
property in brackets:
config.tx_cachehash.parameters.domainStartPage {
field = domainStartPage
wrap = <|>
}