[TYPO3-english] Re: Cache settings dilemma
Viktor Livakivskyi
invisible.kinder at gmail.com
Fri Nov 7 16:03:24 CET 2014
Hi, Stephan
> If a new page renders news lists, the page needs to be tagged by "tx_news_domain_model_news".
> If a page renders a single news either by being a news details page or e.g. based on "more like that" (solr feature), this page needs to be tagged by "tx_news_domain_model_news_$newsId".
>
> Now whenever an editor adjusts a news record in the backend, all caches tagged by both, "tx_news_domain_model_news" as well as "tx_news_domain_model_news_$newsId" are flushed automatically.
>
> So that's not a dilemma but actually completely handled by TYPO3 internals these days. The only thing you need to do: Use prober tagging.
>
> <pre>
> /** @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $typoScriptFrontendController */
> $typoScriptFrontendController = $GLOBALS['TSFE'];
> $typoScriptFrontendController->addCacheTags(array( tx_news_domain_model_news', 'tx_news_domain_model_news_123'));
> </pre>
>
Wow! I didn't even know about this feature. Where can I get more info about that? F.e. Are there any tags, excpet tx_tablename and tx_tablename_uid cleared?
More information about the TYPO3-english
mailing list