Search code examples
phpcachingtypo3realurl

How to use setRequireCacheHashPresenceParameters


I’ve recently run into a cHash caching problem while using realurl. I’ve seen, that there is a method setRequireCacheHashPresenceParameters in the cHashCalculator that isn’t called anywhere in the core nor any of my extensions. Anyone has an idea on how to use it in order to get rid of this problem?

Specifically what seems to happen is that the realurl cache is not fully generated and a crawler somehow accesses a valid link but there is no cHash saved in the database for this page, therefore TYPO3 will cache the content for the page id without parameters (since there is no cHash attached) and on the next call of a page that has no realurl cache set yet, TYPO3 will simply get the content front the previously cached page.

So the solution would be to somehow tell TYPO3 (somewhere in ext_localconf.php or ext_tables.php) that the parameters of this extension need a cHash.

But how can I do that?


Solution

  • I guess you're talking about realurl 1.x.

    I've made a patch specifically for this issue; see https://github.com/dmitryd/typo3-realurl/issues/245 Unfortunately it was rejected by the maintainer, but solves your problem.