[TYPO3-dev] config.linkVars cHash cache problem

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Mar 21 10:45:47 CET 2013


Dmitry Dulepov schrieb am 19.03.2013 10:50:
> Hi!
> 
> JoH asenau wrote:
>> HMENU on the one hand is using typolink but on the other hand it is
>> called without any "useCacheHash" paramater at all. So IF you want to
>> generate a cHash there, you have to provide your own TypoScript setting
>> unless there will be a patch to implement this behaviour by default.
> 
> I made a bug report about it some time ago and tried to implement the
> fix. But it is complicated because in menu you never know if there
> should be a cHash or not. You can know this for language menu but not
> for others. So I did not finish the patch. It is a big flaw in TYPO3
> menu system :(

I guess the "conceptual flaw" is that typoLink is not able to decide by
itself if a cHash is required or not. Instead we have to specify
"useCacheHash" for every link generation.

Since TYPO3 4.7 we have feature #29365 which already allows us to
maintain a list of parameters which require a cHash:

Introduces new configuration options for $TYPO3_CONF_VARS['FE']
* cHashRequiredParameters
* cHashExcludedParameters
* cHashExcludedParametersIfEmpty
* cHashOnlyForParameters

We could expand on that idea to be globally able to decide if a cHash is
required or not in typoLink. Some thoughts on a potential plan:

1) introduce the "auto-calculation" as a new feature which needs to be
enabled through a global config setting

2) at the same time, introduce a way for extensions to "register" their
required cHash parameters with a nice API.

3) we deprecate typoLink's "useCacheHash"

4) we wait 2 releases of TYPO3 and remove "useCacheHash", and start
auto-generating cHash on demand only, expecting that all compatible
extensions use the "registration API"

Cheers,
Ernesto




More information about the TYPO3-dev mailing list