[Typo3-dev] Empty cHash problem
Ernesto Baschny [cron IT]
ernst at cron-it.de
Thu Oct 6 16:21:41 CEST 2005
Elmar Hinz schrieb am 06.10.2005 11:01:
> Kasper Skårhøj describes in his article "The mysteries of &cHash" the
> empty &cHash problem.
>
> http://typo3.org/development/articles/the-mysteries-of-chash/page/3/
>
> I wonder if this is really an empty cHash or rather an empty cache problem.
Empty cHash problem. Empty cache is never a problem, as it can be
filled. :) And if its empty, the empty cHash is not a problem, its just
a problem if the cache already filled!
The problem, to sum up:
When generating the page that will be cached where we have our USER
plugin. The plugin will output something based on the piVars (e.g.
display the detail view of the current record). If we don't take any
precaution, our output will always be cached too by TYPO3 (this is why
we are an USER object!). So the next requests, regardless of the
parameters, would display the same output as the first request, thus
making our parameters useless! Only the first request after clearing the
cache wins. We have to avoid that in the first call already, by only
allowing TYPO3 to cache the output if we are sure that the parameter
combination is something can be checked against a valid cHash.
> It happens according to Kaspers article:
>
> a) when the cache is cleared for that page (is empty)
> b) when the first call comes with paramters that request a special view
> of the page
> c) when no cHash is given
>
> Wouldn't it also happen when
>
> a) ...
> b) ...
> c) a cHash is given but a wrong one
The article section is devoted to the case when cHash is EMPTY, so this
case does not apply.
Also in this case, TYPO3 will see that the cHash is not valid for the
current parameter set and caching will be disabled altogether, which has
the same effect as having an empty cHash.
Cheers,
Ernesto
More information about the TYPO3-dev
mailing list