[TYPO3-mvc] Question regarding $GLOBALS['TSFE']->reqCHash() / cHash handling in extbase

Helmut Hummel helmut.hummel at typo3.org
Wed Jan 15 21:52:42 CET 2014


Hi Victor,

On 15.01.14 18:50, Viktor Livakivskyi wrote:
> We've experienced same problem and the reason in our case was following: there were links to detail view, generated from external websites with wrong cHash (or without it at all). Our plugin has 2 cacheable actions: listAction() and viewAction() - both are called on a same page.
> In a situation, when page's cache is cleared and first hit is from a link with wrong cHash, plugin still gives back correct detail view, but it is put into default page's cache. And next time, when I visit listAction(), which is cacheable and default action - TYPO3 gives back cached version of page, which contains result of fitst hit with wrong (missing) cHash.

Good observation! This is one way how links with missing cHash can be 
"generated".

> In our case we solved it by adding following into [FE][cHashRequiredParameters] = tx_yourextension_yourplugin[controller], tx_yourextension2_yourplugin2[controller]...
> It is a kind of dirty trick, but solves a cache issue.

This is no hack at all, but a perfect solution for your problem. This is 
exactly what cHashRequiredParameters is for.

Kind regards,
Helmut

-- 
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list