[Typo3] problems with caching (Mysteries of cHash ? :-) )
Kraft Bernhard
kraftb at gmx.net
Tue May 10 15:57:21 CEST 2005
Rupert Germann wrote:
> Gerd Reise wrote:
>
>>I have tried to manually disable caching as Kasper described in his
>>article "Mysteries of cHash" with $GLOBALS['TSFE']->set_no_cache(), but
>>doesn´t work either.
>>
>>Anyone know, how to solve this problem ?
>
>
> the problem is: where does this users get the links without cHash from?
>
> a workaround would be to check if a value for cHash is given from GPvars in
> your extension before outputting any content. If no cHash exists -> no
> output. So all users who type in urls by hand will see a white page or - if
> a chash was typed in by hand - caching will be disabled by TYPO3 because
> incoming and calculated cHash doesn't match.
Rupert is right. If you don't display the links without cHash on your page the users
will normally not enter a link without it. Except one user get's curious about this
paramter and tries to remove it ... To work around this I think it would be better to
display your overview page instead of a blank one when no cHash get's sent ...
This will result in that always the overview page is shown when no cHash get's sent.
And about $GLOBALS['TSFE']->set_no_cache() :
you must insert this function into your code so it get's called every time and after doing that you
have to clear the cache ... else an already cached item could be in the cache and this one would be
delivered on request and not generated again.
->set_no_cache() doesn't mean to deliver always a non cached page but more to not cache the page at all.
If the page is not cached it will get rendered again the next time. But if it is already cached you will
see no effect by using ->set_no_cache()
greets,
Bernhard
--
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50
More information about the TYPO3-english
mailing list