[TYPO3-english] Re: Do not cache part of Fluid template. How to?

Viktor Livakivskyi invisible.kinder at gmail.com
Thu Nov 7 22:15:16 CET 2013

Hi, Stephan.

Thank you much for the explanation! You're absolutely right - it is not related to Fluid cache at all. Sorry for confusing topic title - I wanted to know, if I'm missing something in TYPO3's handling of INT_* markers, because I couldn't get, why some Fluid partial or section can't be interpreted as <!-- INT_... --> and processed after page is gotten from cache. 

This paragraph helps a lot in understanding:
As you can see, this thing is far away from being ready to be used inside of a given FLUIDTEMPLATE or Extbase View. If you want to have a controller do like "$this->view->assign('user', $TSFE->fe_user->user);", then this works just. If you wrap the output of "{user.email}" in an "do not cache" fluid part (which could work like the COA_INT or USER_INT and return just the "<!-- INT_* -->" placeholder), this stops working at all. Your controller ends, the view is rendered completely and contains this placeholder segment. Then the post-processing core feature wants to interpret the INT_* fragment and has completely no knowledge about which controller context you're in. No settings, no variable container. You're out of extbase here. In terms of Flow, the subrequest is over.

I also don't like my #4 approach much, but it was the only way, when I'm still able to separate HTML from TS.

Or alternatively invent several COA_INT, which will contain user data, like:
lib.user.name = COA_INT
lib.user.name.10 = TEXT
lib.user.name.10.data = TSFE:fe_user|user|name
lib.user.email = COA_INT
lib.user.email.10 = TEXT
lib.user.email.10.data = TSFE:fe_user|user|email
And call them in Fluid template via f:cObject every time, so they are replaced with INT_*
This allows me to keep all HTML in one template - contrary to my solution #4, when I need separate template for non-cached pageHeaderAction(). Also this allows me to drop my NoCacheController.

But this adds a TS overhead for any data, that shouldn't be cached.
And this doesn't make object re-usable: if I have some lib.heavyCalculatedObject = COA_INT and call it two times in my template via <f:cObject typoscriptObjectPath="lib.heavyCalculatedObject" /> - it'll be calculated two times.

Therefore I like much your suggestion about AngularJS. It allows to keep HTML separate from data and doesn't mess with TS.

Once again - thank you for your time and clean explanation =)

More information about the TYPO3-english mailing list