[TYPO3-v4] [TYPO3-mvc] Re: Is action uncached?

Xavier Perseguers typo3 at perseguers.ch
Thu May 27 11:21:40 CEST 2010


Hi,

 > P.S. maybe take this to the typo3v4-mvc list instead :)

Oups! Of course!!! I wrongly selected this list. Now using followup-to to redirect to the correct mailing list (and copying the original thread).

 >> I may have overlooked something but is there an official way inside a
 >> controller to determine whether the current action is uncached?
 >>
 >> For the time being, I had to add a special annotation to be able to retrieve
 >> that information.

Søren said:
> If you wan't the default controller->action to be uncached, you have
> to "register" it in both arrays.

Dmitry said:
 > I am not a pro in Extbase but aren't you supposed to add uncached actions
 > as a special parameter when you register the plugin? Thus you already know
 > that it will be uncached. No?..

Well, the problem is not to create an uncached action. I know how to do it since the very beginning of Extbase (as I'm an early adopter/tester) ;-) The underlying problem is that I'd like to know 
inside the controller, when performing any action (that is in some common methods for both cached and uncached actions) whether the current action is running in cache or non cached mode.

The point is that for cached action, I may use the pageRenderer to add CSS and JS files while when using uncached actions this does not work as the header is already rendered. As such, I have to play 
with the "basic" addToHeaderData() method which works in uncached mode.

I hope you better get the point.

Thanks anyway for your answers.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-project-v4 mailing list